
All the day, the brain tries to control the male penis and prevent its permanent erection. But when you fall asleep deep, the brain's neuradrenergic cells, which are prone to erection, are turned off by the brain, causing the penis to stop working without an erection. It's interesting to know that this happens overnight many times, but only when you wake up you get an erection.