Enjoy sex like you used to

Learn more

Temporary Erectile Dysfunction: Causes & Treatments

Kristin Hall, FNP

Reviewed by Kristin Hall, FNP

Written by Nicholas Gibson

Published 04/02/2021

Updated 10/11/2023

Temporary erectile dysfunction (ED) is exactly what it sounds like: erectile dysfunction that’s temporary.

But just because it’s short-term doesn’t mean it isn’t stressful. Luckily, it can be treated. 

Ahead, we’ll dive into the causes of temporary ED, how long it lasts and the many treatments out there to help you get back to doing your thing in the bedroom. 

Erectile dysfunction is when you can’t get or keep an erection

Symptoms of erectile dysfunction include: 

  • Being unable to get an erection at any time

  • Being unable to get an erection sometimes 

  • Being unable to keep an erection long enough for satisfactory sex 

ED can be a long-term health issue, but you can also experience temporary or situational ED.

Situational erectile dysfunction is ED that happens in certain situations. For example, perhaps you can’t get hard when you try to have sex with your partner, but you have no problem when masturbating alone.

Or everything works great when you’re lying down, but not so much when sitting up — goodbye, fun sex positions. ED may even strike when you’ve had a drink, but it’s fine when you’re the designated driver. 

Temporary ED, on the other hand, can happen in any situation. The good news is it’s temporary and — thankfully — often treatable.

You may develop temporary ED when you’re stressed and slammed at work, if you take up smoking or if you don’t get much exercise. Luckily, a few lifestyle tweaks could fix the issue.

ED can also be a sign of an underlying health issue. But when you’re battling ED, it’s hard to know if it’s temporary or not, so it’s worth speaking to a healthcare provider to determine the cause.

While it can feel embarrassing to talk about, ED is a common problem. It affects 30 million men in the United States — and it’s not just an issue for older men. You can develop ED at any age, even in your 20s or thirties.

We’ll cover the causes and potential fixes for both types of ED (temporary and long-term) below.

There are many causes of erectile dysfunction. And to make things more complicated, erection problems — especially the temporary ones — can be caused by multiple things at once. 

Here are the most common causes of ED.

Psychological Causes 

Temporary ED can be caused by a range of emotional and psychological factors.

These include:

  • Fear of sexual failure or sexual performance anxiety 

  • Guilt about sexual performance or sexual activities 

  • Low self-esteem

  • Anxiety

  • Depression 

  • Stress — both from ED itself and from day-to-day life

It’s easy to get in your head when you have ED. Unfortunately, that stress and anxiety won’t do your love life any favors. The point is, many psychological causes of ED can make ED worse, creating a vicious circle of more stress and more ED. 

Explore this topic further in our guide to the common psychological causes of ED.

Lifestyle Causes

A few unhealthy lifestyle factors may contribute to temporary ED. 

These include:

  • Drinking too much alcohol. Ever heard of whiskey dick? It’s a real thing — alcohol can lead to ED. Among those with alcohol dependence, 72 percent have one or more sexual dysfunction problems, with premature ejaculation, low sexual desire and ED being the most common. The more you drink, the more likely you are to have problems in the bedroom. But you don’t need to be dependent on booze to have ED — a few glasses of red wine over dinner is enough to mess with your mojo.

  • Smoking. A smoking habit can tank your sex life in the long run, but even a one-off cigarette could lead to ED. So if you’ve just started smoking — or had a night out with more time spent in the smoking area than on the dance floor — it could be behind your temporary ED. One small study gave 20 young men without ED either gum containing the same amount of nicotine as one cigarette or a placebo of nicotine-free gum. They chewed the gum for about 40 minutes before watching an erotic film. The men who got nicotine had a 23 percent reduction in physiological sexual arousal to the porn.

  • Taking drugs. Illegal drugs may physically stop you from getting an erection. They might also affect you emotionally by stopping you from feeling aroused. Drugs like marijuana may cause ED — that’s right. It’s also a thing. A 2019 systematic review and meta-analysis found that ED is twice as high in marijuana users compared to controls. Marijuana may improve sexual function in some men, though, so more research is needed. 

  • Not being physically active. Physical inactivity is bad for your weight, blood flow and overall health. When you exercise, you increase blood flow to your penis — great news for your sex life. Research has found that aerobic exercise can treat ED in people with arteriogenic ED (ED caused by insufficient arterial blood supply). But it’s unclear if exercise could help people with ED caused by medication side effects or psychological issues like performance anxiety.

  • Being overweight. Being overweight is a risk factor for ED because it can cause various health conditions — like diabetes and high blood pressure — that lead to ED. Plus, being overweight or obese may affect your body image, which can add to ED issues.

  • Watching too much porn. One review stated that porn could change your brain’s motivational system, making it harder to, well… get hard without this type of sexual stimulation. You might become conditioned to what you’re watching and need more and more exciting material to get aroused. If you can get and keep an erection when masturbating with porn — but you struggle to without it or with a partner — this could be the reason for your temporary ED.


If you’ve just started taking medication, check the side effects. You might find sexual dysfunction is listed.

Medications that cause ED include:

  • Blood pressure medications 

  • Antiandrogens (for prostate cancer therapy) 

  • Antidepressants 

  • Tranquilizers or prescription sedatives 

  • Appetite suppressants 

  • Ulcer medicines 

On antibiotics? Don’t panic. There’s not much evidence linking antibiotics and ED, so they’re most likely not to blame.

Health Conditions 

ED can be caused by an underlying health condition such as: 

  • Type 2 diabetes

  • Heart disease and blood vessel disease

  • Hypertension (high blood pressure)

  • Chronic kidney disease 

  • Multiple sclerosis 

  • Atherosclerosis (clogged arteries)

  • Peyronie’s disease 

  • Injury from prostate cancer treatments 

  • Surgery for bladder cancer 

  • Injury to erectile tissue or the penis, spinal cord, prostate, bladder or pelvis

  • Neurological problems, like injuries that cause damage to the nervous system, diabetic neuropathy (diabetes-induced nerve damage) or epilepsy

Reach out to a healthcare provider to get screened for underlying conditions that may relate to sexual function issues.

There’s no set time for how long ED lasts. How long you experience erectile dysfunction symptoms will depend on what’s causing them, your lifestyle and your body.  

If your temporary ED is caused by one too many drinks, sobering up can fix the issue. If it’s caused by medication, switching meds may make a difference. But if you need to lose weight, this is obviously a longer journey.

As one example, working out for 160 minutes a week for six months has been shown to decrease ED caused by physical inactivity, obesity, high blood pressure, metabolic syndrome and cardiovascular diseases.

A healthcare provider might be able to offer personalized insight into when you can expect your ED to improve.

choose your chew

add a boost to your sex life with our new chewable formats

The good news about temporary ED is that you can treat it. Yay.

The first step is getting medical advice. We know this can feel a little awkward, but remember: erectile dysfunction is common. And believe us — the experts have seen it all before.

Reach out to your primary care provider or a urologist, or book an online medical consultation with a licensed healthcare provider.

A healthcare provider will probably start by asking a few questions about your medical and sexual history. This could include questions about your symptoms, lifestyle habits and any meds you take. They may also run medical tests, such as a physical exam or blood tests.

All this information will help your provider figure out the underlying cause of your ED so you can get the best treatment to fix it.

Here are the treatment options for temporary ED. 

ED Medications 

Phosphodiesterase 5 inhibitors (or PDE5 inhibitors) are the first-line treatment for ED. These oral medications work by dilating blood vessels in your penis, helping you get hard and stay hard.

FDA-approved PDE5 inhibitors include: 

Another option is our Hims hard mints. These chewable ED meds contain the active ingredients in the erectile dysfunction drugs Cialis, Levitra and Staxyn®. 

ED meds aren’t available over the counter, so you’ll need to speak with a healthcare provider to get a prescription. 

Want to learn more? Our guide to PDE5 inhibitors covers everything you need to know about these ED drugs.

Choose your chew

Therapy for Psychological ED 

If psychological issues are raining on your penis parade, therapy can help. 

A licensed therapist can help you work through chronic stress, anxiety or depression, then teach you techniques to cope with these problems. 

If you’re suffering from guilt, performance anxiety or relationship problems, sex therapy can help to improve these issues specifically.

Online therapy means you can work through the psychological causes of ED from home. 

Habits and Lifestyle Changes for ED 

Your ED might be a result of unhealthy habits, in which case a few lifestyle tweaks could fix the problem. Even if your ED is caused by something else, it’s worth taking a look at your lifestyle to make sure nothing else gets in the way of getting hard.

Here are some lifestyle changes you can make to improve ED: 

  • Cut down on alcohol consumption. The CDC (Centers for Disease Control and Prevention) recommends men stick to two drinks or fewer a day. Drink more than this? Try cutting down. Start by swapping one or two alcoholic drinks for soft drinks or alternating between alcoholic and non-alcoholic drinks.

  • Do more aerobic exercise. Add more cardio to your routine with activities like running, swimming or cycling. One paper concluded that men with ED should do 40 minutes of moderate-to-vigorous aerobic exercise four times a week. The win-win here is that exercise can help reduce stress, keep weight in check and improve overall mental health — all of which can elevate your performance in the bedroom.

  • Stop watching porn. If you can’t get hard without porn, you may have porn-induced ED. Try giving it up to see if that helps.  

  • Quit smoking. If you’re a smoker, take steps to quit. Try nicotine products like gum, patches or sprays and avoid triggers that make you want to smoke, like drinking alcohol.

  • Lose weight if you’re overweight. Getting down to a healthy weight can increase your testosterone levels, boost your self-esteem and help prevent medical conditions that can turn temporary ED into a long-term problem. Focus on eating a healthy diet, exercising and getting eight hours of shut-eye. Talk to a healthcare provider if you need to lose a lot of weight — they can recommend the best ways to do it.

  • Reduce stress. Stress can cause ED — but ED can also be stressful. In any case, it’s worth trying to keep your stress levels low. Get out in nature, spend time with friends, make time for a relaxing hobby and get enough sleep. You know the drill. Reach out for help from family, friends or a therapist if you need more support with your mental health.

Want more tips on how to treat ED? We’ve covered natural ways to maintain an erection in our blog.

sildenafil citrate

get hard for 95% cheaper than Viagra

Erectile dysfunction is never fun — even when it’s a temporary problem. 

Here are the key takeaways:

  • ED has many, many causes. They include everything from stress and performance anxiety to diabetes and alcohol. Temporary ED is usually caused by an unhealthy lifestyle.

  • Temporary ED is reversible. We can’t tell you how long your temporary ED will last, but we can say that, in most cases, it’s reversible. Phew. 

  • Lots of ED treatment options are available. Get back to regular erections by cutting down on stress and drinking, losing weight, trying therapy and taking ED medication like Viagra or Cialis.

Whether you’ve been hit with sudden ED, seemingly out of nowhere, or ED is an issue that comes and goes, it’s best to discuss it with a healthcare provider.

They can make sure nothing more serious is at play and recommend the best erectile dysfunction treatments to get you back in the game.

17 Sources

  1. Definition & Facts for Erectile Dysfunction. (n.d.). https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/definition-facts
  2. Reed-Maldonado, A. B., & Lue, T. F. (2016). A syndrome of erectile dysfunction in young men?. Translational andrology and urology, 5(2), 228–234. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4837321/
  3. Erectile Dysfunction (ED). (n.d.). https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/all-content
  4. Dewitte, M., Bettocchi, C., Carvalho, J., Corona, G., Flink, I., Limoncin, E., Pascoal, P., Reisman, Y., & Van Lankveld, J. (2021). A Psychosocial Approach to Erectile Dysfunction: Position Statements from the European Society of Sexual Medicine (ESSM). Sexual medicine, 9(6), 100434. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8766276/
  5. Symptoms & Causes of Erectile Dysfunction. (n.d.). https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/symptoms-causes
  6. Arackal, B. S., & Benegal, V. (2007). Prevalence of sexual dysfunction in male subjects with alcohol dependence. Indian journal of psychiatry, 49(2), 109–112. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2917074/
  7. Harte, C. B., & Meston, C. M. (2008). Acute effects of nicotine on physiological and subjective sexual arousal in nonsmoking men: a randomized, double-blind, placebo-controlled trial. The journal of sexual medicine, 5(1), 110–121. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2864030/
  8. Preventing Erectile Dysfunction. (n.d.). https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/prevention
  9. Pizzol, D., Demurtas, J., Stubbs, B., Soysal, P., Mason, C., Isik, A. T., Solmi, M., Smith, L., & Veronese, N. (2019). Relationship Between Cannabis Use and Erectile Dysfunction: A Systematic Review and Meta-Analysis. American journal of men's health, 13(6). https://journals.sagepub.com/doi/full/10.1177/1557988319892464
  10. Lamina, S., Agbanusi, E., & Nwacha, R. C. (2011). Effects of aerobic exercise in the management of erectile dysfunction: a meta analysis study on randomized controlled trials. Ethiopian journal of health sciences, 21(3), 195–201. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3275865/
  11. Park, B. Y., Wilson, G., Berger, J., Christman, M., Reina, B., Bishop, F., Klam, W. P., & Doan, A. P. (2016). Is Internet Pornography Causing Sexual Dysfunctions? A Review with Clinical Reports. Behavioral sciences (Basel, Switzerland), 6(3), https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5039517/
  12. Symptoms & Causes of Erectile Dysfunction. (n.d.). https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/symptoms-causes
  13. Gerbild, H., Larsen, C. M., Graugaard, C., & Areskoug Josefsson, K. (2018). Physical Activity to Improve Erectile Function: A Systematic Review of Intervention Studies. Sexual medicine, 6(2), 75–89. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5960035/
  14. Diagnosis of Erectile Dysfunction. (n.d.). https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/diagnosis
  15. Dhaliwal, A., Gupta, M. (2023, April 10). PDE5 Inhibitors - StatPearls. NCBI. https://www.ncbi.nlm.nih.gov/books/NBK549843/
  16. Treatment for Erectile Dysfunction. (n.d.). https://www.niddk.nih.gov/health-information/urologic-diseases/erectile-dysfunction/treatment
  17. Dietary Guidelines for Alcohol. (n.d.). https://www.cdc.gov/alcohol/fact-sheets/moderate-drinking.htm
Editorial Standards

Hims & Hers has strict sourcing guidelines to ensure our content is accurate and current. We rely on peer-reviewed studies, academic research institutions, and medical associations. We strive to use primary sources and refrain from using tertiary references. See a mistake? Let us know at [email protected]!

This article is for informational purposes only and does not constitute medical advice. The information contained herein is not a substitute for and should never be relied upon for professional medical advice. Always talk to your doctor about the risks and benefits of any treatment. Learn more about our editorial standards here.

Kristin Hall, FNP

Kristin Hall is a board-certified Family Nurse Practitioner with decades of experience in clinical practice and leadership. 

She has an extensive background in Family Medicine as both a front-line healthcare provider and clinical leader through her work as a primary care provider, retail health clinician and as Principal Investigator with the NIH

Certified through the American Nurses Credentialing Center, she brings her expertise in Family Medicine into your home by helping people improve their health and actively participate in their own healthcare. 

Kristin is a St. Louis native and earned her master’s degree in Nursing from St. Louis University, and is also a member of the American Academy of Nurse Practitioners. You can find Kristin on LinkedIn for more information.

Read more

Related Articles

Start your ED assessment

Answer a few questions so we can help