Morning erections are technically nighttime erections which
happen during Rapid Eye Movement (REM) sleep (when most dreaming
occurs), although men older than sixty years may have them during
even non-REM sleep. Generally, we experience four intervals of REM
sleep per night. These spontaneous woodies in the wee hours are
caused by specific neuroreflexes that are stimulated during REM
sleep.
Most guys have nocturnal erections throughout their lifetime, and
their frequency, along with one's awareness of them, may vary.
Nighttime/morning erections can be noticeably harder or stiffer
than those had when awake. The penis can stay erect for up to two
hours nightly, and not all men who have erections during the night
wake up with one in the morning.