There bladders fill up and they empty with a little help from the spinal cord. They don't need to think about it. If your child is constantly having accidents after age 5, it's a nuisance. If your child is still in diapers after age 10, it's time for a trip to the pediatric urologist. If you have had more than 1, get it looked into with at least an ultrasound.
Imipramine tones up the sphincter a bit and relaxes the bladder as well.
Take only the prescribed dose, as more may have adverse side effects. Tincture of time. Some children need a little more time to get used to the idea of going to the bathroom. Ask your child if being wet bothers him or her. If the answer is no, you will not have the best of success with any medication, and should avoid surgery.