I used to have sleepwalking problems as a child, and it was right around the same age as your son. My parents eventually figured out that I had to go to the bathroom but was not waking up fully. Every time I would sleep walk, they would walk me into the bathroom, I would go, and then I'd go back to bed.
I don't know for sure if this is your son's problem, but this is the age a lot of kids have nighttime wetting/bathroom issues. A couple of my girls had bedwetting problems at this age. They are suddenly "big kids", being in school full day, sometimes with activities or other things. They suddenly have stress/pressure for the first time in their lives, and they also are more tired from their day. My oldest was a heavy sleeper anyway, and add on the extra fatigue, and she just simply wouldn't wake up--so she'd either wet the bed or sleep walk.
We talked to our pediatrician about it, and he gave her some medication she took for a month that strengthened her bladder muscles. She was totally fine after that.
I hope your son's situation is as easy as that to fix. There could also be some psychological issues, but I would try the easy stuff first to rule it out. Then talk to your pediatrician. I'm sure he/she sees this a lot.
Hope it helps!
J.