First you have to rule out any medical conditions, take him to his physician. try to figure out what time at night it is happening and wake him up before hand and take him to the bathroom. Also sometimes these issues can be psychological, if there have been any major changes in his life, be it personal or family related.
Put an alarm so he can wake up at night to use the restroom, if he is scared of the darkness put a night light. What i do when my little coudin sleeps over is i tell her to tell me when ever she needs to use the restroom or I just wake her up.
He might be scared of the dark so I would suggest to put a night light (flame resistant) in his room and give him a flash light to take with him in the hallway. I would also put him in a overnight pull up diaper.
I had the same problem until I was 13... Is he wide open.... I was... He is too tired to wake up to pee.... My mom , sometimes, would wake me up before she went to sleep and make me go pee... Just like a puppy... Lol... Seriously
If you haven't already or haven't done so recently, talk with your pediatrician. Enuresis is not uncommon and can have a variety of causes, both physiological and psychological. There are medications that can help, depending on cause. Your pediatrician may refer you to a pediatric urologist or a psychologist. Whatever you do, don't try to change his behavior by shaming him or even making a fuss about it. That would more likely only make the problem worse and more difficult to correct.
7 pm is late to stop drinking I would have him drink in the afternoon and be done by 5 with a sip after supper. I'd wake him up at 11 pm to go, later if I was awake. I'd also wake him up to go earlier unless he was already wet.
My oldest daughter had this problem. I bought her one of those alarms that they wear in there underwear. As soon as the least bit of wetness is detected this alarm that sounds like the french police goes off.......it worked for her.