This is usually a serious problem sometimes caused by medical difficulties but more often by emotional troubles. Keep in mind your child ten or twelve-years-old sometimes might have an accident. Even so, it is unlikely for children that old. If you see the sign recurring in your child, a physical examination is necessary. A real physical problem may be the cause.
Here are a couple of important things to know. Even if the problem is emotional, it can become physical if it goes on too long. Not regularly going to the bathroom causes physical problems. This means your child needs medical care for the problem, even if the etiology is emotional.
There is not much you can do to help except calmly have your child clean himself each time he has trouble. Making any more of it will only make his problem worse.
It is specifically important to separate bed-wetting from other difficulties and not attribute undue seriousness to problems exhibited by children under six or seven. Bed-wetting sometimes follows from parent to child and has a genetic component. A small percentage of teens are bed-wetters and do not have any significant problems. If you are concerned, consult with a pediatrician about your child's behavior.