The body control a lot of muscles independent from our will. So when we pee is is not entirely a function decided by our, in our sense, mind. This can sometimes get botched so we wet ourselves. Sleepwalk is another example. Sort of.
What is interesting is that no animal, as far as I know, pee in their sleep. So the body can learn that we don’t like to lie in our own piss and constols it outside outlr awake mind.
Latest Answers