Medically reviewed by Kristin Hall, FNP
Written by Our Editorial Team
Last updated 4/03/2021
Erectile dysfunction, or ED, is a common sexual condition that affects around 30 million men in the United States.
If you have ED, you might find it difficult to get an erection consistently or to sustain an erection for long enough to have satisfying, pleasurable sex.
Although many cases of erectile dysfunction are long-term in nature, others are temporary and may occur as a result of problems such as sexual performance anxiety, alcohol consumption or use of certain types of medication.
Below, we’ve talked about what temporary erectile dysfunction is, as well as the factors that may cause it to affect your sexual performance.
We’ve also explained how you can treat temporary erectile dysfunction with medication, lifestyle and habit changes, therapeutic approaches and more.
Erectile dysfunction often develops due to long-term health issues, such as high blood pressure or atherosclerosis (clogged arteries). However, some cases are short-term in nature and develop due to factors unrelated to your physical health.
Many different factors may cause temporary ED, including psychological and emotional issues, medications and even day-to-day habits.
Some scientific research suggests that excessive use of porn may cause temporary ED that occurs when you’re with a partner.
If your ED is caused by a habit or lifestyle factor, making changes to your lifestyle may also help to improve your sexual performance.
Erectile dysfunction, or ED, occurs when you can’t develop or maintain an erection firm enough to have satisfying, pleasurable sex.
Although many people think of ED as a total inability to get an erection, the reality is that ED can vary in severity. You may have ED if you:
Can get an erection, but can’t maintain it for long enough to have fulfilling sex
Can occasionally get an erection, but not every time you want to have sex
Can’t get an erection, even when you’re sexually aroused
Erectile dysfunction usually becomes more common with age. However, it’s far from uncommon to deal with ED during your 20s, 30s or forties.
To understand how and why erectile dysfunction occurs, it’s important to understand the basics of how erections work in the first place.
At a physical level, an erection occurs when the blood vessels of your corpora cavernosa -- the masses of erectile tissue located inside your penis -- relax, allowing blood to flow into the tissue and make your penis firm.
A fibrous membrane called the tunica albuginea, which wraps around the erectile tissue of your penis, traps this blood inside the corpora cavernosa, helping you to maintain the erection during sex.
This process sounds simple. However, behind the scenes, it’s a more complicated process that involves both local tissue near your penis and your brain and nervous system.
Erections begin with stimulation — either mental, physical or both. When this stimulation causes you to feel sexually aroused, your brain and local nerves deliver impulses to the erectile tissue of your penis, starting the process described above.
Erectile dysfunction, whether long-term or temporary, occurs when one or more factors disrupt this process.
Some cases of erectile dysfunction are referred to as situational ED. This type of ED occurs in specific situations, such as during sex or masturbation.
For example, some men are capable of getting an erection during masturbation, but find it hard to get or maintain an erection with a partner. This type of situational ED may be linked to sexual performance anxiety.
Other things, such as alcohol consumption or use of certain medications or illicit drugs, can also contribute to situational erectile dysfunction.
Other cases of erectile dysfunction are temporary in nature, but not situational. For example, it’s possible for habits or lifestyle factors such as smoking, a lack of physical activity or work-related stress to contribute to difficulty getting and/or maintaining an erection.
This type of erectile dysfunction is often treatable by making certain changes to your habits and lifestyle.
We’ve provided more information about the specific causes of situational and temporary erectile dysfunction in the section below.
A variety of different factors can cause or contribute to erectile dysfunction. While some causes of ED are permanent, many are temporary issues that can be treated using ED medication or by making changes to your habits and lifestyle.
Temporary ED is often caused by psychological or emotional conditions that affect the way you think or feel about sex. These include:
Fear about your sexual performance
Guilt related to sexual activity
Stress, whether general or related specifically to sex
Sometimes, these factors can create a vicious cycle that worsens ED. For example, feelings of anxiety or stress about sexual performance might affect your ability to get an erection, creating a negative experience that reinforces these feelings.
We’ve talked more about these factors in our guide to the most common psychological causes of erectile dysfunction.
Sometimes, temporary erectile dysfunction can develop as a result of certain habits or aspects of your lifestyle. These may include:
Using illicit substances
Drinking alcohol excessively
Maintaining a sedentary lifestyle
Being overweight or obese
These habits can have a negative impact on your cardiovascular health and affect blood flow to your penis. Some, such as excessive alcohol consumption, may also contribute to other sexual performance issues.
Temporary erectile dysfunction can sometimes develop as a side effect of medication. Several different types of medications are linked to ED, including:
Medications used to treat high blood pressure
Sedatives and other medications used to promote calmness or sleep
Medications designed to reduce your appetite
Prostate cancer medications
Luckily, antibiotics are not a cause of ED, but you can read our guide for more information.
In some cases, temporary erectile dysfunction may develop due to an issue in your relationship with your sexual partner, such as a reduced connection or loss of attraction to each other.
One additional factor that may contribute to temporary erectile dysfunction is your consumption of porn.
Although research into this phenomenon is still in its early stages, some clinical studies suggest that regular use of porn may contribute to sexual dysfunctions such as ED. We’ve talked about this topic more in our guide to porn-induced erectile dysfunction.
Finally, erectile dysfunction is often caused by physical health problems that affect your nervous system or blood flow. While some of these are permanent, others are treatable issues that may only cause erectile dysfunction temporarily.
Physical causes of erectile dysfunction include:
Heart and blood vessel disease
Hypertension (high blood pressure)
Chronic kidney disease
Type 2 diabetes
Injury to the penis, nervous system, spinal cord or other areas
You can learn more about these factors and their impact on your sexual health and performance in our detailed guide to the causes of erectile dysfunction.
Erectile dysfunction is almost always treatable, either with medication, changes to your lifestyle, therapy or a combination of approaches.
If you’re experiencing temporary ED, it’s important to talk to a licensed healthcare provider to find out how you can treat your symptoms and improve your sexual performance.
Below, we’ve provided more information about science-based treatment options for temporary erectile dysfunction.
Several medications are used to treat ED. These medications are referred to as PDE5 inhibitors and work by increasing blood flow to your penis, making it easier for you to get and maintain an erection when you feel sexually aroused.
Currently, the FDA has approved the following medications as ED treatments:
Sildenafil. The active ingredient in Viagra, sildenafil is a fast-acting medication that can treat erectile dysfunction for up to four hours per dose.
Tadalafil. The active ingredient in Cialis, tadalafil is a longer-lasting medication that can treat erectile dysfunction for up to 36 hours per dose.
Vardenafil. The active ingredient in Levitra®, vardenafil treats erectile dysfunction for approximately four hours per dose.
Avanafil. Available as Stendra®, avanafil is a new, second-generation PDE5 inhibitor that’s designed to have fewer side effects than older medications.
These medications require a prescription, meaning you’ll need to talk to a healthcare provider in order to purchase and use them. We offer ED medications online, following a consultation with a licensed healthcare provider.
Even if your ED is caused by a psychological factor, these medications may help to improve your sexual performance and increase your confidence during sex. As such, your healthcare provider may prescribe medication if you have ED due to anxiety or another psychological issue.
Our guide to PDE5 inhibitors goes into more detail about how these ED medications work, their potential side effects, key differences between medications and more.
If your ED is caused by a psychological issue like anxiety, depression or feelings of guilt about sex, you may benefit from therapy.
A range of therapeutic approaches are used to treat ED, including cognitive behavioral therapy (CBT).
This type of therapy involves identifying and modifying the thought patterns and behaviors that can contribute to temporary erectile dysfunction.
If you think your erectile dysfunction may be related to a relationship issue, options like couples therapy may help you and your partner to overcome your relationship problems and strengthen your connection with one other.
Another form of therapy that’s used to treat erectile dysfunction is sex therapy. Our guide to sex therapy for ED provides more information about how this form of counseling works, its potential benefits and more.
It’s often possible to reduce the severity of ED and improve your sexual performance by making changes to your habits and lifestyle. Try to:
Quit smoking. Smoking can damage your blood vessels and affect the flow of blood to your penis. Research also shows that the nicotine in cigarettes can dull your response to sexual stimulation.
If you smoke, make an effort to quit. You can find out more about the best strategies for quitting, dealing with cravings and keeping yourself smoke-free in our complete guide to quitting smoking.
Limit your alcohol consumption. Drinking too much alcohol can result in a situational form of ED called alcohol-induced erectile dysfunction, or whiskey dick. Some research has also linked heavy drinking to an increased risk of ongoing sexual dysfunction.
While it’s okay to drink alcohol occasionally, it’s best to avoid heavy drinking. The CDC recommends drinking no more than two servings of alcohol per day for men, or a single drink per day for women.
Maintain a healthy body weight. Obesity is a major risk factor for erectile dysfunction. In fact, research shows that men with a BMI in the obese range are around three times as likely to develop ED as men with a normal BMI.
If you’ve recently gained weight and find that it’s more difficult to develop or maintain an erection, try to lose weight using the two tips below.
Eat a healthy, balanced diet. A balanced diet will help you to maintain a healthy body weight. Research also shows that some diets, such as the Mediterranean diet, may be helpful for improving your erections and sexual health.
Stay active. Exercising improves your cardiovascular fitness and may help to treat ED that’s caused by poor heart health. It’s also a natural form of treatment for depression and other mental health issues that may cause temporary ED.
Stop using illicit drugs. Many illicit substances are associated with sexual dysfunction and sexual health issues. Despite being legal in many states, marijuana is also linked to an increased risk of ED.
If you have a substance use disorder and need help to give up illicit drug use, you can seek professional assistance through FindTreatment.gov.
Reduce stress. While it’s normal to feel stressed from time to time, chronic stress can have a negative impact on your physical and mental health, including your ability to get and sustain an erection.
If you’re feeling stressed, try to manage your stress levels. This helpful list of techniques from the Department of Health and Human Services shares several techniques that you can use to de-stress and maintain your physical and mental wellbeing.
Finally, if you’re a habitual porn user, you might benefit from going porn-free while you focus on treating your erectile dysfunction.
While watching porn isn’t necessarily bad for your sexual health, it is linked to certain forms of sexual dysfunction. For example, studies have correlated porn use with arousal, attraction and performance issues, including erectile dysfunction and a reduced level of interest in sex.
We’ve provided more information about this relationship and how you can potentially overcome it in our guide to porn-induced ED.
Erectile dysfunction is a common issue that affects millions of men every year. For some, it’s a persistent annoyance that can last a lifetime, while for others, it’s a temporary issue that comes and goes.
If you’ve recently started to experience ED, you can talk to a healthcare provider online to learn more about ED treatment online, including FDA-approved medications.
You can also learn more about lifestyle changes for treating ED in our detailed guide to natural methods for protecting your erection.