This website has a lot of information which may help getting the many facts which i am unable to comunicate.
http://www.nhsdirect.nhs.uk/articles/article.a spx?articleId=211§ionId=6733
As this website explains Stress can be a common reason that may increase the risk of such a problem. Incontinence is not un common in children of various ages so don't worry your not alone in this case.
My main advise would be to find out whats happening at school, you can do this in two ways:
By talking to his teachers, and explaining the situation to them (this may seem embarrassing but may produce results) And by Talking on a personal an relaxed note to your son, focus the questions on how he feels at school, no the actual problem itself.
If he or you does not feel comfortable about this idea then using a strong male figure who is close to him may remove some of the embarrassement.
Hope you can resolve this issue.