I agree with getting this book "It's No Accident"
http://itsnoaccident.net/about-the-book/ . Older kids with bedwetting problems often have undiagnosed constipation - which doesn't mean they don't poop on a regular basis, it means that their intestines are full of fecal matter that hasn't fully been emptied. There are a lot of studies supporting this but it hasn't gotten widespread attention because many (including medical professionals), don't understand that you can have regular bowel movements and still have constipation. The longer fecal matter stays in the intestinges, the more water is absorbed out of it and the more firm (even rock like) it becomes. That makes it all the more difficult to pass. "Newer" poop can squeeze around it which is why care providers don't realize the kid is constipated because he's actually pooping on a regular basis. But, the mass presses on the bladder (remember how your baby pressed on your bladder when you were pregnant) which can lead to incontinence, particularly at night. This is exactly what happened to my 8 yo DS. We've been working with a gastroenterolgist for a few months to clear the backlog (pun intended :lol

and to help him 're-learn' to recognize the sensations that tell him he needs to poop.
Remember the little girl, Zoe Rosso, that got kicked out of an Arlington Preschool because she had too many potty accidents? Turns out she was constipated in the manner I just described
http://www.washingtonpost.com/blogs/on-parenting/post/what-happened-to-zoe-rosso-the-toddler-who-got-kicked-out-of-school-for-too-many-accidents/2012/05/16/gIQAsoi3TU_blog.html . Once treated for it, Zoe stopped having potty accidents. You should know that this type of constipation is frequently overlooked because it can't be felt/seen on physical examination. Stomachs can be flat even if their full of poop and no masses felt upon physical exam.