my 8 year old daughter has the same problem and we did alot of research on this-
I saw a show on kids who wet the beds and the number is like 90% of them (and the % increases every year they are more than 5 years old) brains are actually not producing a required enzyme
the key is when you urinate in the morning- it appears darker than during the day- the reason is your body releases less water overnight- your brain tells your kidneys to do this as you are intaking fluids at night
when your son urinates in the morning- check to see if his urine is light- same if you wake him up to pee- that is the first indication that his brain is not making this chemical (enough) of it to tell his body to conserve water. There is a pill that your child can take for the short term that replaces this naturally occuring enzyme and will help your son not wet the bed.
He is probably not wetting himself at sleepovers as he is stressed and worried and excited about sleeping- so he is probably not really falling into a deep sleep.
They say in this that the child is also probably the child of a bedwetter
they said in this health show that the problem is most parents dont speak about this to anyone- and so it never got the attention it deserved and that although most children's bodies will outgrow this problem- the psycological damage of contstantly wetting the bed, the pressure from parents about drinks and wetting, the secret they have to carry about wetting the bed from their peers, not being able to do the same things as their siblings or friends (sleep overs, summer camps etc etc) is longlasting.
they dismiss betwetting alarms as too little too late
anyway check with your doctor to see if this may be the probemlem.