Fact Checked Fact Checked
How to stop an erection

How to stop an erection

You might have found yourself wondering how to lose an erection if you’ve got one at an inappropriate or potentially embarrassing time. A random erection is one that occurs at a time when you’re not sexually stimulated or “in the mood.”

Random erections are more often associated with teenagers and the process of puberty, but they can occur in men of any age. Some men also struggle to get or maintain an erection; this is common and normal too. It’s when ED starts to impact you consistently and negatively that it might be worth discussing your symptoms with a medical professional.

Daniel Atkinson
Medically reviewed by
Daniel Atkinson, GP Clinical lead

“Random erections are more often associated with teenagers and the process of puberty, but they can occur in men of any age.”

Table of contents
Medically reviewed by
Dr Daniel Atkinson
GP Clinical lead
on October 31, 2022.
Meet Daniel  
Was this article useful?

Why do we get erections unexpectedly?

If you’ve ever found yourself standing to attention without explanation, you’re not alone. Random erections are common and usually not something to worry too much about. If you’ve ever wondered how to have a healthy penis, random erections could be a sign that everything is working as it should be.

One type of random erection is one which occurs in the night, known as nocturnal penile tumescence (NPT). You may also have woken with an erection, colloquially referred to as morning wood. NPT is common and typically occurs three to five times in average, healthy men. Nighttime erections can last for between 20 and 30 minutes , and are associated with the rapid eye movement (REM) stage of sleep.

Random erections may also happen because of hormone levels. The levels of testosterone, a male sex hormone, can fluctuate daily. It may be possible that as they rise and peak, random erections occur.

But whatever the reason, the ability to get and maintain an erection, even randomly, is typically a sign that, physically, everything is working in order. Erections happen when the brain sends chemical messages to the blood vessels in the penis. They respond and dilate, which allows for blood to flow into the corpus cavernosum — two sponge-like chambers in the penis. One there, the vessels at the base of the penis constrict which should induce lasting rigidity and firmness.

For erections to happen, you generally need to have healthy circulation. If you experience random erections but also suffer with erectile dysfunction when you try to have sex, this could be indicative that your ED symptoms are more psychological in nature.

How to get rid of an erection

There are some simple steps you can take to ensure it doesn’t happen, or that it subsides quickly if it does. From physical measures like taking a shower to psychological measures like practicing meditation techniques. Read on to find out how to not get an erection when you don’t want one.

Changing your position when you have a random erection might sound self-explanatory, but it actually has two functions.

Firstly, you can try and manoeuvre yourself to hide the erection and reduce how self-conscious you feel. This could include crossing your legs, for example.

But certain positions may also help to move pressure away from the blood vessels that supply the penis and induce an erection. The way you’re sitting may also inadvertently be stimulating, so changing position could help to reduce the effect of stimulation.

Another thing you may want to try if you have a random erection is changing your train of thought or distracting yourself.

For example, try thinking about something serious like your rent or mortgage, bills or work deadlines. Or you may want to think about something completely random or even humorous.

Meditation may also help with random erections because it shifts focus from the physical and external to the mind and the internal. This might sound hard to grasp in practice, so here’s a good way to get you started:

  1. If you have a random erection, shift the focus to your breathing.
  2. If you can, close your eyes.
  3. Sit with your back straight and inhale through your nose for four seconds.
  4. Hold your breath for seven seconds.
  5. Exhale through your mouth for eight seconds.
  6. Try to do this with a completely blank mind, don’t think of anything at all. (It’s harder than it sounds.)

This is known as the “4-7-8 technique.” It might not always be practical to meditate fully, but focusing on your breathing alone is a subtle way of practicing meditation without drawing attention to yourself.

Going to the toilet is a good method to try to help unwanted erections subside. This is because you’re concentrating your mind on something else. Plus, there’s also the physical fact that it’s difficult to urinate with an erection.

When you have an erection a muscle contracts in order to prevent semen from entering the bladder, but also stop urine from passing through the urethra.

As your erection subsides this muscle relaxes, opening up a passage for urine once again. This is why it’s possible to urinate while ‘semi’ erect.

If you go to the toilet with a random erection, concentrate on the process. If it helps, you can gently press on your bladder to promote the need to pee.

One technique that might work if it’s convenient for you is to have a warm bath or shower.

In their guidance on priapism (an erection that lasts for several hours and won’t go down), this is one of the approaches the government advises if you’re trying to reduce an erection.

A downside to this method is that taking a shower isn’t always practical, especially if you have a random erection in a public setting.

Another method to help alleviate a random erection is to simply sit and wait. Moving may inadvertently feel stimulating, and so not moving at all and waiting patiently might help the erection subside.

Just sit, relax and focus on your breathing — and remember, nobody is more conscious of your erection than you. So don’t panic; wait it out.

Erections happen because blood flows into the penis. One there, vessels at the base of the penis constrict which induces lasting firmness. This is all well and good, except when you don’t want it to happen and it does.

To try and get rid of an erection, focus on basic exercise. Exercise will get your blood pumping and the circulatory system will divert blood to other areas of the body, specifically those you’re targeting through physical activity. So a brisk walk would divert blood to the legs, pushups to the arms.

When is an erection a health risk?

Random erections are natural. Usually, they’ll go away on their own.

But, if you have an erection that doesn’t go away – this could potentially be a health risk. Specifically, if you have an erection that lasts for two hours or longer and is accompanied by pain or swelling, or an erection that lasts for four hours or longer and there is no pain, you need to call 999 or visit A&E.

A painful erection that doesn’t go away is called priapism. Priapism can be caused by certain medications, like blood-thinners, antidepressants or recreational drugs, or it can be caused by certain health conditions such as blood disorders.

Priapism needs to be treated quickly to avoid lasting damage to the penis. One method of treatment involves draining blood from the penis while the area is numbed using local anaesthetic.

Some types of injectable ED treatments can cause prolonged erections if the dose is too high. Applying ice to the erect penis and doing some physical exercise is often helpful in this situation. Again, if you get an erection that lasts for more than four hours after using treatment, it’s a medical emergency (so go to hospital).

What does it mean if I get erections randomly, but can’t get them during sex?

Getting random erections, perhaps during the night or in the morning, but experiencing an inability to get them while you’re having sex is a clear sign of erectile dysfunction.

It could also point specifically to ED that is caused by psychological factors. If you experience random erections or nocturnal penile tumescence (NPT), this shows that physically, all the internal mechanisms which provide you with an erection are working in order. Your blood vessels are dilating, the penis is filling with blood, you’re experiencing lasting firmness and rigidity, and so on.

If you’re unable to get it up when you want to have sex, this shows you may have psychological ED. This can be a symptom of mental health conditions like depression, anxiety or PTSD. But it can also happen when you’re tired or because of things like panic or worry surrounding the idea of performance, relationship issues or stress.

If you get random erections but can’t get one during sex, the single best piece of advice we can give is to sit down with your partner and talk it through. Discuss what’s happening and any reasons you think might be causing it. If this doesn’t help, take it one step further and consider speaking with your doctor, a counsellor or a sexual health expert.

Talk to us about your health:

Help for erectile dysfunction

Erectile dysfunction can be complicated and difficult to understand, but it doesn’t have to be something you settle for. It is possible to reverse erectile dysfunction and get back to enjoying a healthy sex life.

Reference Popover #ref3
Reference Popover #ref2
Reference Popover #ref1

How we source info:

When we present you with stats, data, opinion or a consensus, we’ll tell you where this came from. And we’ll only present data as clinically reliable if it’s come from a reputable source, such as a state or government-funded health body, a peer-reviewed medical journal, or a recognized analytics or data body. Read more in our editorial policy.

Suggest a guide

Is there something you’d like to read about that we haven’t yet covered. Suggest it.

Give us the inbox treatment.

Disclaimer: The information provided on this page is not a substitute for professional medical advice, diagnosis, or treatment. If you have any questions or concerns about your health, please talk to a doctor.

Suggest a health guide

Tell us your idea here.

(And leave your email too, so we can let you know if we write an article based on your suggestion.)

What did you like about it?

What didn't you like about it?

Suggest a treatment

If there’s a particular treatment or condition you’re looking for, tell us and we’ll look into it for you.

We may email you about the problem, but you can opt out of these communications any time you like.

Tell us about a problem

I accept the terms of use.
We may email you about the problem, but you can opt out of these communications any time you like.

Ask or suggest something.

Submit your question here, or tell us if you’ve found an issue on our site.

We may email you about your query, but you can opt out of these communications any time you like.

Get the latest health news and articles, sent to your inbox.

By clicking 'Subscribe now' you're agreeing to our Terms.

You’re signed up to our newsletter. Keep an eye on your inbox for our latest update.

We’ll get back to you very soon. We aim to respond to all queries in one working day.