Many children wet the bed until they are 5 or even older. A child's bladder might be too small. Or the amount of urine produced overnight can be more than the bladder can hold. Some children sleep too deeply or take longer to learn bladder control. Stress can also be a factor. Children should not be punished for wetting the bed. They don't do it on purpose, and most outgrow it.
Call the doctor if your child is 7 years old or older and wets the bed more than two or three times in a week. The doctor will look for and treat any other heath problems that could cause the bedwetting. Bedwetting alarms, bladder training, and medicines might help with the bedwetting.
NIH: National Institute of Diabetes and Digestive and Kidney Diseases