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. So, what do you do if this happens to you? Here we’ll talk you through some tips and tricks on stopping or getting rid of random erections.

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.”

Go to
Medically reviewed by
Dr Daniel Atkinson
GP Clinical Lead
on August 02, 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 fairly common and usually not something to worry too much about. They could even be a sign that everything is working as it should be.

A common type of ‘random erection’ is the night time erection, known as nocturnal penile tumescence (NPT). You may also have woken with an erection, colloquially referred to as ‘morning glory’. NPT is common and typically occurs three to five times per night in healthy men. Nighttime erections can last for at least 30 minutes , and are mostly 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.

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 unwanted erections don’t happen or to make them subside quickly if they do. From physical measures like taking a shower to psychological measures like practicing meditation techniques. Click on the tabs below to find out more on the different ways of stopping unwanted erections:

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. Crossing your legs is probably the most obvious choice.

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 standing up 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.

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 could help with random erections because it shifts your focus from the physical and external to the mind and the internal. If this sounds difficult to grasp, here’s some basic steps 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 necessarily 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 can be painful), this is one of the approaches the government advises if you’re trying to reduce an erection.

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. Once 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, push-ups 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 treatments for erectile dysfunction 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 in working order.

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 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.

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 recognised analytics or data body. Read more in our editorial policy.

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

Tell us what you want to hear.

Have a subject you’d like us to cover in a future article? Let us know.

Give us the inbox treatment.

We're making healthcare more about you. Sign up to our newsletter for personalised health articles that make a difference.

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 didn't you like about it?

What did 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.

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.

Our average rating based on 3339 reviews.

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.

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

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


Sign up to our newsletter for all the latest on Erectile dysfunction and more.

By clicking 'Subscribe now' you're agreeing to our Privacy Policy.