How does an erection happen?

An erection does not depend on the penis alone. This article explains the mechanism step by step: the brain, blood vessels, pelvic floor muscles, nervous system and hormones.

In this article
  1. 1. An erection starts in the brain
  2. 2. Blood vessels must widen and bring in enough blood
  3. 3. The pelvic floor muscles must “hold” the blood in
  4. 4. The nervous system must be in “relaxed” mode
  5. 5. Hormones influence energy and desire
  6. The mechanism in brief
  7. So where should recovery start?
  8. Frequently asked questions

Key points

  1. An erection needs four things working together: the brain sends signals well, blood vessels bring in enough blood, muscles hold the blood in, and the nervous system is relaxed.
  2. Stress and worry can affect an erection even when the blood vessels are normal.
  3. The male hormone (testosterone) does not cause an erection directly, but it plays a part in sexual desire, overall energy and the body's recovery.
  4. Each person may have a different underlying cause, so it is worth assessing which cause is responsible before choosing a treatment approach.

Many people who notice that an erection does not happen, is not full, or softens during sex look for a fix right away. Before talking about recovery, though, we should understand the basics: how an erection happens. Without understanding the mechanism, we cannot tell which system the problem lies in or where to focus.

1. An erection starts in the brain

Many people think this is purely a matter of the genitals, but an erection actually begins in the brain. When there is stimulation, whether a sight, a sound, a thought or a touch, the brain sends signals through the nervous system to the blood vessels of the genital area. If the brain is relaxed, this system works well. If the person is stressed, anxious or under pressure, the system is suppressed at once. This is why some people “can have an erection when alone but not during sex.”

2. Blood vessels must widen and bring in enough blood

After the brain sends its signal, the blood vessels widen so that blood can flow into the tissue of the penis. One key substance involved is Nitric Oxide, which helps the vessels widen and increases circulation. If the blood vessels begin to deteriorate because of

  • High cholesterol
  • Diabetes
  • High blood pressure
  • Smoking
  • Increasing age

blood cannot flow in fully, which can lead to an erection that is not full or not firm enough.

Other questions? You can ask a doctor on Line before you book.

3. The pelvic floor muscles must “hold” the blood in

An erection does not depend only on blood flowing in; the blood also has to be held in place. The pelvic floor muscles play an important part at this stage. If these muscles are weak, blood drains away quickly, so an erection may occur but not last. This is why pelvic floor training is directly relevant to sexual function.

4. The nervous system must be in “relaxed” mode

Two main parts of the nervous system are involved:

  • The relaxation system (parasympathetic) → supports an erection
  • The stress system (sympathetic) → suppresses an erection

When the body is in stress mode, for example fear of failing or worry about performance, an erection can fade at once, even if blood flow is normal. This is a key mechanism behind “softening during sex.”

Does this sound like you? You can describe it to a doctor on Line first. There is nothing to decide yet.

5. Hormones influence energy and desire

Testosterone does not cause an erection directly, but it plays a part in:

  • Sexual desire
  • Overall energy
  • The body's recovery

If hormone levels fall, the response to stimulation may fall as well.

The mechanism in brief

An erection needs all four of these:

  1. The brain sends signals well
  2. Blood vessels bring in enough blood
  3. Muscles hold the blood in
  4. The nervous system is relaxed

If any one is missing, an incomplete erection, or softening during sex, may occur.

Want to know what tests to expect before you book? Ask a doctor on Line.

So where should recovery start?

Addressing the problem for the long term means assessing which system is the underlying cause.

  • Some people need to improve circulation
  • Some people need to train the pelvic floor muscles
  • Some people need to manage stress
  • Some people may be suited to supportive recovery technology such as Focus Shockwave or electromagnetic stimulation

For an overview of a systematic approach to recovery, you can read the main guide: “Restoring sexual function: why erections fail, are incomplete or sexual function declines, and how to address it”

Frequently asked questions

Why can some people have an erection when alone but not during sex?
An erection starts with the brain sending a command through the nerves to the blood vessels. When you are alone you are usually relaxed, so this system runs smoothly. But when it comes to sex, many people get stressed, anxious or afraid of not performing well, and the body goes into stress mode and holds the erection back, even though the blood vessels may be fine. If this happens often, a doctor should help find the cause.
Which systems does an erection depend on?
Four things have to work together: the brain sends signals well, blood vessels bring in enough blood, the pelvic floor muscles hold the blood in, and the nervous system is relaxed. If any one is missing, an erection may be incomplete or may soften during sex.
If an erection is not full, where should care begin?
A doctor should first assess which system is the cause, because each person is different. Some people need to look at circulation, some need pelvic floor training, and some need to manage stress. The doctor then chooses a suitable approach together with the patient.

This content is general information to support your decision. It is not a diagnosis or a treatment order, and results differ from person to person. If you have symptoms, consult a doctor. Medically reviewed by Dr. Wipawee Chinjenpradit (ว. 28779) on 7 Nov 2026.

View men's sexual health services

Have a question?
Ask on Line

You can ask without giving your real name. The doctor answers according to your own situation, not according to an article.

Scroll to Top