Nighttime
At night, the pituitary gland produces antidiuretic hormone (ADH) which tells the kidneys to slow down the production of urine. As we've mentioned, some children don't yet make enough of this hormone. This means their kidneys continue to produce urine at the same rate as during the day, which could be one reason why they wet the bed.
It might also be because their brain isn't responding to signals from the bladder or they may be in a very deep sleep. Either way, the child doesn't recognise that the bladder is full, stays asleep and involuntarily releases urine from the bladder.
What's important to remember is that bedwetting is a phase that most children grow out of.