Morning erections happen because your body cycles through periods of REM sleep throughout the night, and each one triggers an involuntary erection. A healthy man typically has 3 to 5 erections per night, each lasting 10 to 25 minutes. The one you notice when you wake up is simply the last in a series that’s been happening all night long.
The REM Sleep Connection
Erections during sleep are tightly linked to REM sleep, the stage most associated with vivid dreaming. In a healthy young man, the erection begins near the onset of a REM cycle, reaches full rigidity quickly, persists for the entire episode, and then fades as REM ends. Since your longest REM period typically occurs in the final stretch of sleep, right before you wake up, that’s the erection you’re most likely to catch.
These erections are involuntary and have nothing to do with sexual dreams or arousal. They occur in all sexually healthy males, from infancy through old age. The process is driven by shifts in your nervous system during REM sleep. During waking hours, certain signals in the brain actively suppress erections most of the time. During REM, those suppressive signals quiet down, and the nervous system pathways that increase blood flow to the penis take over by default.
Testosterone Plays a Supporting Role
Testosterone follows a daily rhythm tied to your sleep cycle. Levels are at their lowest in the evening and climb steadily overnight, peaking between roughly 7 and 10 a.m. This morning surge doesn’t directly cause the erection (that’s the REM cycle’s job), but higher testosterone levels make the tissue more responsive to those REM-triggered signals. The combination of peak testosterone and a final REM period is why morning erections tend to be particularly firm.
Why Your Body Does This
Nighttime erections aren’t just a quirk of sleep. They serve a maintenance function. When the penis becomes erect, oxygen-rich blood floods the erectile tissue. This regular oxygenation helps keep that tissue healthy and elastic. Without it, the tissue can gradually stiffen and scar, a process called fibrosis, which over time makes erections harder to achieve. Think of it as your body running a nightly systems check, keeping the plumbing in working order even when you’re not using it.
How They Change With Age
Both the frequency and firmness of nighttime erections decline gradually over a lifetime. During puberty, erections occupy just over 30% of total sleep time in boys aged 13 to 15. By ages 60 to 69, that figure drops to about 20%. The erections still happen in older men, but they may be less rigid and shorter in duration. This is a normal part of aging, driven by gradual changes in blood vessel health, hormone levels, and sleep architecture (older adults spend less time in REM sleep overall).
When Morning Erections Stop
Because morning erections depend on healthy blood flow, nerve function, and hormones, their absence can be a useful signal. If a man is experiencing erectile difficulties during sex but still wakes up with erections, that generally points toward a psychological or situational cause, like stress or performance anxiety. If morning erections have disappeared entirely, physical factors are more likely involved.
Conditions commonly linked to a loss of morning erections include cardiovascular disease, diabetes, low testosterone, and sleep apnea. Sleep apnea is a particularly underrecognized culprit because it fragments REM sleep, directly disrupting the mechanism that produces these erections in the first place. Certain medications, especially antidepressants and blood pressure drugs, can also suppress them.
A gradual decline is expected with age, but a sudden or complete disappearance at any age is worth paying attention to. Doctors evaluating erectile dysfunction will consider morning erections alongside medical history, hormone levels, and medication use to figure out what’s going on. The presence or absence of that morning erection is one of the simplest clues about whether the underlying issue is physical or psychological.

