In short

  • There are many different causes of erectile dysfunction (ED).
  • If you get an erection when you masturbate, but not during sex, it is likely that you are experiencing performance anxiety.
  • During moments of stress, the body releases a chemical called cortisol.

There are many different causes of erectile dysfunction (ED). If your ED is psychological, you may be able to achieve an erection during masturbation, but not during other sexual activities. Masturbation itself does not cause erectile dysfunction, although there is growing interest in the possibility of porn-induced erectile dysfunction.

Why do I get an erection when I masturbate, but not during sex?

If you get an erection when you masturbate, but not during sex, it is likely that you are experiencing performance anxiety. Performance anxiety is a condition in which men feel particularly nervous about having sex. The anxiety surrounding sex can be for a variety of reasons, including body-image, self-esteem, worries about satisfying their partner, or lasting long enough. This anxiety can impact your sex life, contributing to erectile dysfunction or in some cases premature ejaculation. If these conditions occur, the anxiety may become heightened around sex, exacerbating the problem.

What does performance anxiety do to the body?

During moments of stress, the body releases a chemical called cortisol. Cortisol does various things to the body, including tightening the blood vessels. As erections rely on blood flow to the penis, this restricted flow can make it difficult to obtain or maintain an erection.

What can I do about performance anxiety?

There are two primary approaches to overcoming performance anxiety: medication and psychological therapy. Medications such as Viagra and Cialis can help you to obtain and sustain an erection. This can help to reduce any anxiety about obtaining an erection, but can also help you achieve a more satisfying sex life. Psychological therapies, such as counselling or CBT, can be used to help you explore the root causes of your performance anxiety. This is more of a long-term cure than medication, as it should help resolve the problems underlying the condition. You can learn techniques to reduce your stress, better communicate with your partner and to control your anxiety levels. It is possible to use a combination of medication and psychological approaches to solve the short-term and long-term problems.

What is Porn-Induced ED?

In recent years, there has been a big increase in erectile dysfunction for men under 40. It is thought that the availability of online pornography has contributed to this. Pornography-induced erectile dysfunction (PIED) is thought to be caused by over-exposure to porn. A chemical in the brain called dopamine is necessary to get an erection. But when you watch porn – especially if you masturbate at the same time – you get a huge influx of dopamine. As you watch more porn, you may become desensitized. The dopamine levels you need to become aroused, have increased, so you may need to watch more extreme porn to become aroused. Following this, if you’re then in a situation with your partner, you may find it difficult to be aroused to the same level as you would be by porn, which can lead to erectile dysfunction.

Sources

References

2 sources were selected to match the subject of this article. Link destinations were checked twice when added. This does not mean every statement has been individually source-mapped or clinically approved.

  1. Do pornography use and masturbation play a role in erectile dysfunction and relationship satisfaction in men?

    PubMed / International Journal of Impotence Research · HTML · peer-reviewed multivariable observational study · 2023 · Link destination checked 5 September 2026

  2. Erectile dysfunction (impotence)

    NHS · HTML · official patient guidance · Link destination checked 5 September 2026

Reference links open the cited source pages. If you spot something out of date, tell our content team.

Who wrote this

Written and reviewed by our team

Authored by

Hywel McGlinchy - Pharmacist and Medical Writer

Pharmacist / Content Writer

Hywel has been a registered pharmacist since 2017; he started with Simple Online Pharmacy in 2020. Hywel was responsible for helping review and author accurate site content. He worked with our GPs to make sure all aspects of the medications mentioned are covered.

Read Hywel’s profile

Medically reviewed by

Karim Nassar, Co-Founder, Pharmacist & Author

Karim Nassar

Co-Founder, Pharmacist & Author

Karim is a registered pharmacist with the General Pharmaceutical Council (GPhC) and was a founding member of Simple Online Healthcare in 2015. With a Master of Pharmacy degree from Strathclyde University, Karim brings a strong foundation in pharmaceutical care and a passion for leveraging digital solutions to improve patient access to healthcare.

Read Karim’s profile

Published

Last medically reviewed

Sources cited

See 2 references

Keep reading

More Erectile dysfunction advice

View all Erectile dysfunction advice