system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5 how we learn to control our bladders when asleep?

I get how we do when awake but how do we learn to do this when snoozing when we don’t have control over other things like snoring or sleep talking/ walking?
gpt
When your bladder isn't very full, not peeing takes zero effort, as your bladder isn't trying to get rid of anything. As infants, we pee whenever the urge comes. With time and toilet training, we learn to voluntarily resist peeing until we have an acceptable place to pee. Importantly, the bladder fills slowly and the urge comes on over time, so there's a "I might need to pee soon" well before the "I have to pee right now." Only the second one requires conscious resisting.

With learning to stop bedwetting, we don't actually acquire a new skill as far as resisting urination, but rather that a full bladder should be a trigger to wake. The most effective treatments for bedwetting are basically alarms set off by wet sheets, which wake the sleeper. Over time this makes an association between "might need to pee soon" and "wake up." (We also get help from a nighttime increase in a hormone that restricts urine output.)

TL;DR: You don't learn to control your bladder while asleep, you just learn to wake up before you need to.