How do erections work?

Neurobiologist and science communicator Paula Vaidelauskaite
Reviewed By
Paula Vaidelauskaite
Neurobiologist and science communicator Paula Vaidelauskaite
Medical review by
Paula Vaidelauskaite
Written by
Mojo's Research Team
Published on
April 5, 2022
A shirtless man unbuttons his jeans in soft morning light
Table of contents
Chevron down icon

Erections work when arousal signals from your brain and nerves trigger the release of nitric oxide, which relaxes the muscle inside the penis so blood can rush in. The swollen tissue then presses on its own veins and slows blood from draining out, which keeps the erection firm.

During an erection, blood flows into the penis at about 20 to 40 times its resting rate (Panchatsharam et al., 2023). Because erections rely on brain signals and blood flow, erectile dysfunction (ED) can have physical causes, psychological causes or both (NIDDK, 2024).

What triggers an erection?

Sexual stimulation starts the process. Thoughts, sights, sounds, or touch send signals through the brain, spinal cord, and nerves to the penis. Touch to the genitals can even trigger an erection through reflexes in the spinal cord, without the brain starting it (Dean & Lue, 2005).

Two parts of your nervous system play different roles. The parasympathetic nervous system helps an erection start and build. The sympathetic nervous system helps keep the penis soft and brings it back down afterward. Both systems are active at the same time and interact with each other (Panchatsharam et al., 2023).

What happens inside the penis during an erection?

As arousal builds, nerves and the cells lining the blood vessels in the penis release nitric oxide. Nitric oxide sets off a chain reaction that makes another chemical messenger, called cGMP, and cGMP relaxes the smooth muscle inside the penis. With that muscle relaxed, blood flows in through the arteries and fills the spongy tissue (Panchatsharam et al., 2023).

What keeps an erection firm?

An erection stays firm mainly through a process called veno-occlusion. As the spongy tissue inside the penis fills with blood, it swells and squeezes the draining veins against a tough outer layer called the tunica albuginea. This restricts blood from flowing back out.

Muscles at the base of the penis also tighten to add extra firmness, but the blood held in the tissue does most of the work (Panchatsharam et al., 2023).

The erection process, step by step

StageWhat happensNervous system state
StimulationArousal signals travel through the brain, spinal cord, and nervesParasympathetic activity rises. Both systems interact
InflowNitric oxide relaxes smooth muscle, blood rushes in (20-40x resting flow)Mainly parasympathetic
RigidityVeno-occlusion restricts blood outflow, muscle contraction adds firmnessMainly parasympathetic, plus muscles at the base of the penis
Going soft (detumescence)Sympathetic activity increases, smooth muscle contracts, blood drainsMainly sympathetic

How firm is firm? The Erection Hardness Score

Firmness comes in degrees, and there's a simple 0 to 4 scale for rating it called the Erection Hardness Score (EHS). You score your own erection. Using data from a study of 307 men across several countries, researchers found the scale was a reliable way to measure hardness (Mulhall et al., 2007).

The EHS is a quick, helpful tool to share with a doctor. Doctors also use a longer, more detailed questionnaire, so the EHS works best as one piece of the picture (Sexual Medicine Society of North America, n.d.).

ScoreWhat it means
0Penis does not enlarge
1Penis is larger, but not hard
2Penis is hard, but not hard enough for penetration
3Penis is hard enough for penetration, but not completely hard
4Penis is completely hard and fully rigid

Score wording from (Sexual Medicine Society of North America, n.d.).

The three types of erections

Doctors describe 3 types of erections, based on what sets them off.

TypeWhat triggers itWhen it happens
ReflexogenicSomething touching the genitals. Signals can travel through reflexes in the spinal cordDuring touch or sexual contact
PsychogenicSexual thoughts, memories, or fantasies, or things you see or hearWhen something arousing catches your attention, without touch
Nocturnal (sleep-related)Brain activity during sleep, mostly REM sleepWhile you're asleep

Types from (Cleveland Clinic, 2023) and (Dean & Lue, 2005).

Why do erections happen during sleep?

Sleep erections happen mostly during REM (rapid eye movement) sleep (Dean & Lue, 2005). These erections are linked to activity in certain parts of the brain during REM, and they aren't caused by sexual stimulation (International Society for Sexual Medicine, n.d.-b).

Several can happen in a typical night, often around 3 to 5 over 8 hours of sleep (International Society for Sexual Medicine, n.d.-a). The number varies from person to person and night to night, so having fewer isn't automatically a problem.

Sleep erections also explain why you might wake up with one, often called morning wood (Cleveland Clinic, 2025).

What affects erections over time

Arousal involves your brain, hormones, emotions, nerves, muscles, and blood vessels (Mayo Clinic, 2025). Age and everyday habits both play a part in how well those systems work together.

How erections change with age

As you get older, erections might take longer to start and might not be as firm, and you might need more direct touch to get and keep one (Mayo Clinic, 2025).

Blood flow to the penis may also decrease. It isn't clear whether that's down to aging itself or to health conditions that become more common as men get older. The refractory period, which is the wait after orgasm before you can get another erection, gets longer too (Jimbo, 2025). Morning erections may come less often and feel less stiff (Cleveland Clinic, 2025).

Even so, ED is not a typical part of aging (Mayo Clinic, 2025). If erections become a regular problem at any age, a doctor can help you work out why.

Everyday habits that help or get in the way

Here's what the evidence says about common everyday factors, and what helps with each one.

FactorWhat the evidence saysWhat helps
Smoking and nicotineTobacco lowers blood flow to the veins and arteries (Mayo Clinic, 2025). Nicotine itself, including from vapes and e-cigarettes, can change how well blood vessels widen (Whitehead et al., 2021)Stop smoking, and cut back on nicotine in any form, including vapes and pouches
AlcoholDrinking too much alcohol may contribute to ED (NIDDK, 2024)Limit alcohol or don't drink
ExerciseNot getting enough physical activity may contribute to ED (NIDDK, 2024)Exercise regularly
Emotional healthFeeling lonely, low self-esteem, or negative body image can cause ED or make it worse (NIDDK, 2024)Find ways to ease stress, and get help for anxiety or depression
Long-term healthConditions that affect blood vessels, nerves, or hormones, like diabetes, heart disease, and high blood pressure, can lead to ED (NIDDK, 2024)Work with a doctor to manage ongoing conditions
SleepSleep conditions are on the list of physical causes of ED (Mayo Clinic, 2025)See a doctor about ongoing sleep problems. Frequent loud snoring and daytime sleepiness can be signs of sleep apnea (National Heart, Lung, and Blood Institute, 2025)

Most tips in the last column come from (Mayo Clinic, 2025).

When the process breaks down: erectile dysfunction (ED)

Erectile dysfunction (ED) can happen when any stage of this process gets disrupted. The cause can be physical, like a problem with blood flow or nerves, or psychological, like stress or anxiety. Often, it's a mix of both (NIDDK, 2024).

ED affects younger men too. Some studies estimate that as many as 30% of men under 40 have experienced it, though estimates vary a lot with the group studied and how ED is measured (Nguyen et al., 2017).

If stress, anxiety or mood seem to be playing a bigger role than anything physical, psychological erectile dysfunction explains how the mind affects the same process described above. For the physical causes a doctor may look at, erectile dysfunction basics is a good place to start.

What this means for treating erection difficulties

Because an erection depends on both your brain and your blood flow, working on erection difficulties usually means looking at both. Mojo's Erection Reset is built around that idea.

Dr. Shannon Chavez is the expert behind the program. She is a licensed clinical psychologist, AASECT-certified sex therapist, and certified clinical sexologist. The program focuses on the mind side of the process, since stress and anxiety are common psychological causes of ED (NIDDK, 2024).

If erection difficulties keep happening, see a doctor. Physical and psychological factors often play a part in the same problem, so psychological support can go alongside a medical check or treatment. Medication can help some men, and a doctor can talk you through whether it's right for you.

Erectile dysfunction treatment options covers the medical side, and psychological ED treatment walks through what helps on the mental side.

This article is for general information. It should not replace advice from a qualified medical doctor. If you're worried about erection difficulties, talk to a doctor who can look at your specific situation.

FAQs

What stops an erection?
Chevron down icon

Sympathetic nervous system activity increases and tells the smooth muscle to contract. This lets blood drain back out of the penis, and the erection goes down (Panchatsharam et al., 2023).

Is erectile dysfunction always physical?
Chevron down icon

No. ED can come from physical causes, psychological causes, or a mix of both (NIDDK, 2024).

How long does a normal erection last?
Chevron down icon

This varies a lot from person to person. It depends on things like arousal, age and stimulation, so there's no single "normal" length of time to aim for.

It's also common for an erection to fade sometimes. Most men occasionally can't get or keep an erection, usually because of stress, tiredness or alcohol, and it's nothing to worry about if it only happens now and then (NHS, 2023).

Should I worry if I don't wake up with an erection?
Chevron down icon

Not necessarily. Going without a morning erection isn't always a concern (International Society for Sexual Medicine, n.d.-b). Nighttime and morning erections are linked to sexual health, though, so if they stop as a regular pattern, it's worth talking to a doctor (Cleveland Clinic, 2025).

Sources

  1. Panchatsharam, P. K., Durland, J., & Zito, P. M. (2023). Physiology, erection. In StatPearls. StatPearls Publishing. https://www.ncbi.nlm.nih.gov/books/NBK513278/
  2. National Institute of Diabetes and Digestive and Kidney Diseases. (2024). Symptoms & causes of erectile dysfunction. NIDDK. https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/symptoms-causes
  3. Nguyen, H. M. T., Gabrielson, A. T., & Hellstrom, W. J. G. (2017). Erectile dysfunction in young men: A review of the prevalence and risk factors. Sexual Medicine Reviews, 5(4), 508–520. https://doi.org/10.1016/j.sxmr.2017.05.004
  4. Mulhall, J. P., Goldstein, I., Bushmakin, A. G., Cappelleri, J. C., & Hvidsten, K. (2007). Validation of the erection hardness score. Journal of Sexual Medicine, 4(6), 1626–1634. https://doi.org/10.1111/j.1743-6109.2007.00600.x
  5. Sexual Medicine Society of North America. (n.d.). ED diagnosis: Erection hardness score. SexHealthMatters. https://www.sexhealthmatters.org/component/content/article/ed-diagnosis-erection-hardness-score/
  6. Cleveland Clinic. (2023). Erection. Cleveland Clinic Health Library. https://my.clevelandclinic.org/health/articles/10036-erection
  7. Dean, R. C., & Lue, T. F. (2005). Physiology of penile erection and pathophysiology of erectile dysfunction. Urologic Clinics of North America, 32(4), 379–395. https://pmc.ncbi.nlm.nih.gov/articles/PMC1351051/
  8. International Society for Sexual Medicine. (n.d.-a). What is the nocturnal penile tumescence (NPT) test? ISSM. https://www.issm.info/sexual-health-qa/what-is-nocturnal-penile-tumescence-npt/
  9. International Society for Sexual Medicine. (n.d.-b). Is a lack of morning erections a concern? ISSM. https://www.issm.info/sexual-health-qa/is-a-lack-of-morning-erections-a-concern/
  10. Cleveland Clinic. (2025, July 7). Early risers: Why men get morning erections. Cleveland Clinic Health Essentials. https://health.clevelandclinic.org/morning-wood
  11. Mayo Clinic. (2025). Erectile dysfunction: Symptoms and causes. Mayo Clinic. https://www.mayoclinic.org/diseases-conditions/erectile-dysfunction/symptoms-causes/syc-20355776
  12. Jimbo, M. (2025). Effects of aging on the male reproductive system. In MSD Manual Consumer Version. Merck & Co. https://www.msdmanuals.com/home/men-s-health-issues/biology-of-the-male-reproductive-system/effects-of-aging-on-the-male-reproductive-system
  13. Whitehead, A. K., Erwin, A. P., & Yue, X. (2021). Nicotine and vascular dysfunction. Acta Physiologica, 231(4), e13631. https://pmc.ncbi.nlm.nih.gov/articles/PMC8026694/
  14. National Heart, Lung, and Blood Institute. (2025). Sleep apnea: Symptoms. NHLBI. https://www.nhlbi.nih.gov/health/sleep-apnea/symptoms
  15. NHS. (2023). Erectile dysfunction (impotence). NHS. https://www.nhs.uk/conditions/erection-problems-erectile-dysfunction/
Editorial standards

Mojo aims to provide useful wellbeing resources to its users; however, you should not solely rely on opinions or advice available on the Website or given by the Community. Always seek advice from a qualified medical doctor or other healthcare professional before acting.

About the experts

Neurobiologist and science communicator Paula Vaidelauskaite
Paula Vaidelauskaite
Neurobiologist & science communicator

A neurobiologist and science communicator, Paula turns research on the brain, behaviour and health into clear, evidence-based education about mental, physical, and sexual well-being.

Learn more
Next arrow
Work on the mind side of erections
Dismiss

An expert-led program for erection difficulties linked to stress and anxiety.