In most cases, erectile dysfunction (ED) is temporary and can be resolved by improving overall health. But if there’s a medical cause like nerve damage or decreased blood flow to the penis, you may need medication.

ED is common in men at midlife. For many men, it may be possible to improve your erectile function and reverse ED.

Read on to learn what you can do to improve erectile function.

Research suggests that lifestyle improvements can improve your erectile function. In a study of Australian men age 35 to 80, nearly a third reported erectile problems over a five-year period. These problems spontaneously improved in 29 percent of the men, suggesting that factors that can be controlled, like lifestyle, were behind the ED reversal.

Enhance heart health

Poor cardiovascular health reduces your body’s ability to deliver blood needed to produce erections. In a study published in 2004, researchers followed male participants for 25 years. The researchers found that heart disease risk factors predicted which men were most at risk of future ED. Numerous studies have strongly tied four major cardiovascular risk factors to ED:

  • Smoking. Not smoking, or quitting if you do smoke, prevents ED.
  • Alcohol. Reduce alcohol consumption. Heavy drinkers experience ED more often.
  • Weight. One study found that in overweight men with ED, losing weight helped to improve erectile function in about a third of the study participants.
  • Exercise. Studies show that physical activity, especially when combined with a healthy diet, can improve erectile function.

Avoiding these risk factors may help improve erectile function and reverse ED.

Boost testosterone

Taking steps to counteract low levels of testosterone, the male sex hormone, can improve erectile health. To naturally increase testosterone levels:

  • lose weight
  • reduce stress
  • exercise

These tips can also improve heart health, which may further reduce your ED symptoms. Here are more evidence-based ways to naturally increase your testosterone levels.

Get to sleep

Lack of restful sleep substantially impacts your sexual performance. Studies show that men with interrupted breathing at night, or sleep apnea, improved their erectile function after using a CPAP breathing machine at night.

Replace your bike seat

Some studies have linked bicycling to ED, though more research is needed to confirm the connection. Bicycle seats put pressure on nerves and blood vessels in the pelvic region. If you’re a frequent or long-distance cyclist, consider buying a seat specially designed to reduce pressure on your perineum. Learn more about the effects of cycling on erectile function.

Increase sexual frequency

Frequent or regular sex can help you improve overall performance. One study found that men who had intercourse less than once a week were twice as likely to develop ED at least once a week.

Psychological factors, such as performance anxiety, can lead to ED. Addressing psychological roots of ED can help reverse the condition. Relationship problems, anxiety, and depression lead the list.

Healthy relationships

Erections sufficient for sex depend on arousal and desire, whether you take ED medications or not. Strife and dissatisfaction in an intimate relationship can have a negative impact on libido, arousal, and ultimately, erectile function. Relationship counseling is an option.

Address mental health issues

Anxiety, stress, and depression can lead to ED. In a small study, 31 men newly diagnosed with ED either took tadalafil (Cialis) only, or took tadalafil while also following an eight-week stress management program. At the end of the study, the group who participated in the stress management program saw more improvement in erectile function than the group who took only tadalafil.

Mindfulness meditation, yoga, and exercise all reduce stress and anxiety. You may also want to see a therapist who can help you manage anxiety and depression. Medication may also help anxiety and depression, though some medications can suppress sexual function.

Some medical causes of ED are difficult to reverse, including:

  • Low blood flow. For some people, ED is caused by blocked arteries to the pelvic area. That’s because once you’re aroused, you need sufficient blood flow to inflate the spongy erectile tissues in the penis that create an erection.
  • Nerve damage. In men who have their prostate glands removed because of cancer, even careful “nerve sparing” surgery won’t entirely prevent ED. Even with gradual improvement after surgery, many men often need to use ED medications to have sex.
  • Parkinson’s disease. Up to 70 to 80 percent of men with Parkinson’s have ED as well as low libido, premature or delayed ejaculation, and inability to have orgasms.
  • Peyronie’s disease. This condition causes extreme curving of the penis that can make intercourse painful or impossible.

ED medications, like sildenafil (Viagra), can often help men with ED caused by medical conditions, but you won’t be able to reverse or cure the ED.

Check your meds

Drug side effects are one medical issue that can be tweaked to reverse ED. Common culprits include antidepressants and thiazide, a drug used to make your body shed water to lower blood pressure. If you think medication is causing ED, talk to your doctor. You may be able to substitute another drug or reduce the dosage.

Men occasionally have trouble getting or keeping an erection that is firm and long-lasting enough for satisfying sex. In many cases, erectile problems come and go, and can be improved by improving your general health. In men with medical causes like nerve damage or insufficient blood supply to the penis, ED may require use of medications.