Night-time dryness is a separate developmental milestone from daytime toilet training. It depends on the brain maturing enough to either wake the child or suppress urine production overnight. Your child is not doing it on purpose.
What's normal
By age five: one in five still wet the bed. By seven: one in ten. By ten: one in twenty. Boys are more commonly affected. It often runs in families.
Practical management
Plenty of water during the day (restricting fluids doesn't help). Avoid caffeine. Regular toilet trips including just before bed. Waterproof mattress covers. Easy access to a toilet or potty at night. Don't regularly wake them to use the toilet - this doesn't teach the skill they need to develop.
Rewards
Reward the process, not the outcome. Give a sticker for going to the toilet before bed, not for a dry night - because a dry night isn't within their conscious control.
When to seek help
If a child who was dry for six months or more starts wetting again (secondary bedwetting) - often linked to stress but occasionally a UTI or constipation. Your GP can offer bedwetting alarms (which train waking) or desmopressin medication (which reduces urine production). Both have good evidence.