Scientist Sergio Diaz Alvarez from the University of Newcastle in Australia tried to explain why men so often Wake with erections. It turns out that there are a number of reasons for this phenomenon. About the study the newspaper writes The Daily Mail.
Night is a period of dreams, when the brain can come up with all of the possible situations. Often this freedom of thought leads to erotic fantasies during sleep. Note, similar mechanisms have on women, only to notice the erection in them is not so simple.
The excitation process are also influenced by the endocrine system. Some hormones activate the reproductive system and affect the brain.
Interesting another fact. Most people experience erection that is during periods of REM sleep during dreams. During the slow phase the person usually looks relaxed and motionless.