Sleep-related erections are automatic, recurring events that happen in virtually every healthy male from infancy through old age, typically three to five times per night and lasting anywhere from a few minutes to half an hour each. They are tightly linked to the rapid eye movement (REM) phase of sleep and appear to serve a maintenance function for erectile tissue, but they also carry surprising diagnostic value. Whether you notice them or not, what happens below the belt while you sleep offers a window into vascular health, hormonal status, and the integrity of the nerve pathways that govern erections during waking life.
The REM Sleep Connection
Sleep-related erections track closely with REM sleep, the phase associated with vivid dreaming. REM cycles recur roughly every 90 minutes through the night, and each successive cycle tends to be longer and more intense than the one before it. The pattern of erections mirrors this: episodes grow longer and more rigid as the night progresses, with the strongest ones occurring in the final hours before waking.1International Journal of Impotence Research. The role of sleep stages in the regulation of erectile function: impacts of REM sleep fragmentation That last erection of the night is the one most people recognize as “morning wood.”
Despite the association with the dream stage of sleep, these erections are not driven by erotic dreams. Research has consistently shown that they occur regardless of dream content, prior sexual activity, or bladder fullness.2The Open Psychology Journal. Why Do Healthy Men Experience Morning Erections? The mechanism appears to be neurological rather than psychological: during REM sleep, certain brainstem centers that normally inhibit erections go quiet, while the parasympathetic pathways that promote blood flow to the penis become more active. The result is an erection that has nothing to do with arousal and everything to do with how the brain cycles through sleep stages.
Why the Body Bothers
The leading explanation for why sleep-related erections exist centers on tissue maintenance. The internal structures of the penis are made of smooth muscle and collagen wrapped around spongy chambers that fill with blood during an erection. When the penis is flaccid for long stretches, the oxygen level in those chambers drops. Erections flush fresh, oxygenated blood through the tissue, and researchers believe this regular oxygen delivery prevents a slow deterioration called cavernous fibrosis, where smooth muscle is gradually replaced by scar-like collagen.3PubMed. Testosterone and sleep-related erections: an overview
Cavernous fibrosis matters because it is one of the most common physical causes of erectile dysfunction. When too much smooth muscle is replaced by stiff tissue, the chambers can no longer trap blood effectively, leading to erections that are weak or unsustainable. Animal and human studies have shown that even partial erections appear to raise oxygen levels enough to protect against this damage, which means the body does not necessarily need full rigidity to get the protective benefit.4The Journal of Sexual Medicine. The Correlation Between Intracavernosal Pressure and Cavernosal Blood Oxygenation Think of it as the body running a maintenance cycle overnight, keeping the plumbing in working order.
The Role of Testosterone
Testosterone is required for sleep-related erections, but perhaps not as much as you might expect. Research measuring testosterone levels alongside overnight erection patterns found that the threshold for maintaining normal sleep erections sits well below the low end of what labs consider the normal male range. Men with testosterone levels above roughly 200 nanograms per deciliter showed robust nighttime erections, while those below that level saw clear declines in frequency, duration, and rigidity. Within the normal range, however, having higher testosterone did not translate to meaningfully better sleep erections.5PubMed. Relationship between sleep-related erections and testosterone levels in men
This has practical implications. If you are experiencing noticeably weaker or absent morning erections, severely low testosterone is one possible explanation, but it would usually come with other symptoms like fatigue, reduced muscle mass, and low mood. And because the threshold is fairly low, a man whose testosterone is merely on the lower side of normal is unlikely to see his nighttime erections affected for that reason alone.
How Sleep Erections Change With Age
Sleep-related erections begin before birth. Ultrasound studies have captured erections in fetuses, and they continue through infancy, childhood, and adolescence. The phenomenon is not sexual in the way most people understand the word; it is a reflex wired into the nervous system from the earliest stages of development.
In healthy aging men, the frequency and duration of nighttime erections decline gradually over the decades, even after accounting for changes in sleep quality. A sleep-lab study of men across different age groups found that while the degree of swelling during each episode stayed relatively stable, the number of episodes per night and how long each one lasted dropped progressively with age. Most men over 60 in the study did not achieve full erections during sleep, despite reporting that they were still sexually active with their partners.6PubMed. Nocturnal penile tumescence in healthy aging men The decline seems to reflect a combination of age-related changes in blood vessel function, nerve conduction, and the gradual shortening and fragmentation of REM sleep that happens in older adults.
Diagnosing Erectile Dysfunction While You Sleep
One of the most important clinical uses of sleep-related erections has been distinguishing psychological from physical causes of erectile dysfunction. The logic is straightforward: if a man cannot get erections during sex but still has normal erections during sleep, his anatomy and blood supply are probably intact, and the problem is more likely psychological. If sleep erections are also impaired, a physical cause is more likely.
In a study of 30 men with erectile difficulties, those whose problems turned out to be psychological showed normal nighttime erections, with a striking gap between their sleep performance and their waking complaints. Men with physically caused dysfunction, on the other hand, had sleep erections that closely matched their poor waking performance.7JAMA Psychiatry. Evaluation of Nocturnal Penile Tumescence in the Differential Diagnosis of Sexual Impotence: A Quantitative Study Similar results have been replicated in larger groups, including a study of veterans in which sleep-lab monitoring correctly sorted the vast majority of patients into organic versus psychological categories.8PubMed. Psychometric differentiation of psychogenic and organic erectile disorders
The standard monitoring device for this kind of assessment, called RigiScan, measures both swelling and rigidity at two points on the penis across one or more nights. It was long considered one of the most reliable tools for sorting out erectile dysfunction causes, though its reputation has become more complicated. Some clinicians have questioned how well it performs outside a controlled sleep lab, and the device itself is not exactly user-friendly: roughly a quarter of men in one study had trouble keeping it on all night, and average pain ratings were moderate.9Sexual Medicine Reviews. The Role of Nocturnal Penile Tumescence and Rigidity (NPTR) Monitoring in the Diagnosis of Psychogenic Erectile Dysfunction: A Review Today, sleep erection monitoring is used less often as a first-line diagnostic tool than it once was, partly because of these practical limitations and partly because other tests, like vascular ultrasound, have become more accessible. But the underlying principle remains sound and still guides clinical thinking.
Blood Pressure, Blood Vessels, and What Sleep Erections Reveal
Sleep-related erections do not just reflect the health of the penis; they reflect the health of your blood vessels more broadly. The small arteries supplying the penis are narrower than those feeding the heart, so vascular problems like atherosclerosis often show up in erectile function before they cause chest pain or a cardiac event. This is why erectile dysfunction in younger men is such a powerful warning sign for future cardiovascular trouble.
Data from a large community-based study found that men aged 40 to 49 with erectile dysfunction had a dramatically higher incidence of new coronary artery disease compared to men of the same age without it. That predictive gap narrowed in older men, where cardiovascular disease is already common, but in younger adults the signal was striking and exceeded even traditional risk factors like smoking and high cholesterol.10ScienceDirect / American Heart Journal. Curriculum in Cardiology Prognostic utility of erectile dysfunction for cardiovascular disease in younger men and those with diabetes If your morning erections quietly disappear in your 40s or 50s and you have no obvious explanation, it is worth mentioning to a doctor, not just for sexual health but for cardiovascular screening.
Hypertensive men provide a vivid illustration of this connection. Sleep-lab studies measuring penile blood flow during REM sleep found clear differences between healthy men and those with high blood pressure: the amplitude of blood flow pulsations was highest in healthy controls and lowest in hypertensive men who also reported erectile complaints, with hypertensive men without sexual complaints falling in between.11PubMed Central. Erectile dysfunction in hypertensive men: sleep-related erections, penile blood flow and musculovascular events The graded pattern suggests that vascular damage shows up as a spectrum rather than a sudden cliff.
Sleep Apnea and Erectile Function
Obstructive sleep apnea deserves its own mention because it sits at the intersection of sleep quality and vascular health, both of which feed into nighttime erections. Men with sleep apnea have higher rates of erectile dysfunction, and the severity of one tracks with the severity of the other. In a study of 50 men evaluated for both conditions, those with abnormal sleepiness scores had four times the rate of erectile dysfunction compared to men who slept normally, and the correlation between how sleepy they were and how impaired their erections were was strong.12PubMed. Defining association between sleep apnea syndrome and erectile dysfunction
The mechanism likely involves several overlapping problems. Apnea repeatedly drops blood oxygen levels during the night, fragments REM sleep (which is when erections happen), and triggers surges of adrenaline-like hormones that constrict blood vessels. Over time, these repeated insults damage the endothelial lining of blood vessels and impair nitric oxide production, the chemical signal that relaxes smooth muscle and allows an erection to occur.
Treating apnea with CPAP (continuous positive airway pressure) appears to help, at least partially. A randomized trial found that CPAP increased the number of sleep-related erections compared to a sham device, though the rigidity and fullness of those erections did not significantly improve.13The Journal of Clinical Endocrinology & Metabolism. Randomized Trial of CPAP and Vardenafil on Erectile and Arterial Function in Men With Obstructive Sleep Apnea and Erectile Dysfunction That mixed result suggests that apnea treatment restores some of the neural triggers for sleep erections but may not reverse vascular damage that has already accumulated.
When Sleep Erections Become Painful
A rare but distressing condition called sleep-related painful erection (SRPE) turns the normal nightly cycle into a source of suffering. Men with SRPE experience erections during sleep that are accompanied by pain severe enough to wake them repeatedly, while erections during waking hours are completely pain-free and normal. No structural abnormalities of the penis are present, and the condition is classified as a parasomnia, a disorder of sleep behavior.14PubMed Central. Sleep related painful erection: an algorithm for evaluation and management
Because SRPE is so uncommon, no large clinical trials have evaluated treatment. Published data consist mostly of case reports and small series, which limits confidence in any single approach.15PubMed Central. Sleep-related painful erections treated with sodium oxybate One unusual case report documented the condition even in an infant, whose sleep-related painful erections appeared during the first year of life and were confirmed by sleep monitoring to occur primarily during REM sleep.16The Journal of Clinical Sleep Medicine. Sleep-related painful erection: the first case in a child The existence of SRPE in such a young child underscores how deeply the erection reflex is embedded in the nervous system and how little it depends on sexual awareness or hormonal maturity.
Women Have an Equivalent
Sleep-related genital arousal is not exclusive to men. Women experience cyclical clitoral engorgement and increased vaginal blood flow during REM sleep, following the same pattern of intensifying through the night’s successive REM cycles.2The Open Psychology Journal. Why Do Healthy Men Experience Morning Erections? Like male sleep erections, female genital arousal during sleep appears unrelated to dream content. The parallel suggests the phenomenon is a fundamental feature of REM-sleep physiology rather than something specific to male anatomy, though it has been studied far less extensively in women, partly because measuring it is more technically challenging.
Medications That Interfere
A number of commonly prescribed drugs can suppress or alter sleep-related erections, often without patients or doctors connecting the dots. Antidepressants, particularly selective serotonin reuptake inhibitors, are among the most frequent culprits, because boosting serotonin activity tends to dampen the dopaminergic and noradrenergic pathways involved in triggering erections. Evidence on the pharmacology of erection suggests that dopamine receptor activation promotes erection, while certain adrenergic influences inhibit it.17JAMA Network (Archives of General Psychiatry). Effects of Psychotropic Drugs on Human Erection and Ejaculation Antipsychotics, some blood pressure medications, and drugs that lower testosterone can all have similar effects.
If you have started a new medication and notice that your morning erections have vanished, it is worth flagging to your prescriber. In many cases, a dosage adjustment or a switch to a different drug in the same class can restore normal nighttime erection patterns without sacrificing the medication’s primary benefit.
Observations Across Species
Sleep-related erections are not unique to humans. They have been documented in a range of mammals, and observations of captive male chimpanzees provide some of the most detailed non-human data. Researchers recorded spontaneous nocturnal erections in chimps, sometimes accompanied by ejaculation, with no social or sexual stimulation involved. One proposed explanation is that nocturnal erections and emissions serve to clear older, lower-quality sperm, replacing it with fresher ejaculate that would be more competitive during mating. In species like chimpanzees, where multiple males compete for the same female’s offspring, ejaculate quality matters.18Behaviour. Spontaneous nocturnal erections and masturbation in captive male chimpanzees (Pan troglodytes)
Whether this sperm-turnover hypothesis applies to humans is less clear, but it adds another possible layer of explanation alongside the tissue-oxygenation theory. The two are not mutually exclusive: nighttime erections could serve a maintenance role for erectile tissue while also contributing to reproductive readiness.
How Attitudes Have Shifted Over Centuries
The cultural and medical interpretation of sleep erections has traveled a remarkable arc. Ancient observers knew the phenomenon existed but had little framework for understanding it. In the Middle Ages, sleep erections were widely viewed as sinful, a sign that the male body was rebelling against its owner’s moral control. Ecclesiastical courts even used them as evidence in marital disputes: if a man was accused of impotence as grounds for divorce, court officials might sit at his bedside overnight to observe whether erections occurred during sleep.19PubMed. Sleep-related erections throughout the ages
By the 17th century, sleep erections were lumped in with masturbation, which at the time was believed to cause a long list of physical ailments. It was not until the early 20th century that psychoanalyst Wilhelm Stekel recognized morning erections as a normal part of healthy male physiology from infancy onward. German researchers in the 1940s were the first to document the cyclical pattern, and the link to REM sleep was established in the decades that followed. Today, the dominant scientific view is that sleep erections protect the structural integrity of erectile tissue, a complete inversion from the centuries-old assumption that they were symptoms of moral or medical pathology.
Leonardo da Vinci, incidentally, deserves credit for an even earlier insight. Dissecting cadavers in the late 15th century, he correctly concluded that erections were caused by blood filling the penis, overturning the ancient Galenic view that they resulted from the accumulation of air.20Sexual Medicine. Physiology of Penile Erection—A Brief History of the Scientific Understanding up till the Eighties of the 20th Century It took roughly another three centuries before the role of the nervous system in controlling that blood flow was recognized.