Key points

  • Some medications, testosterone replacement, and surgical implants can help treat erectile dysfunction (ED).
  • Diet and lifestyle changes may also help.
  • Some foods and supplements have shown promise in treating ED.
Was this helpful?

Erectile dysfunction (ED) is when a male finds it difficult to have or maintain an erection.

Reaching or maintaining an erection usually isn’t a reason for concern, but it can affect your quality of life and lead to:

  • anxiety
  • stress in relationships
  • loss of self-esteem

According to a 2016 study, causes of ED can be either physical or emotional.

Physical causes may relate to:

  • hormonal factors
  • blood supply
  • problems with the nervous system
  • other factors

People with diabetes, obesity, cardiovascular disease, and other health conditions may have a higher risk for ED. Stress, anxiety, and depression can also contribute.

There are various treatment options for treating ED, depending on the cause. A doctor may recommend:

  • medications, such as Viagra, Cialis, and Levitra
  • testosterone replacement therapy
  • surgery to place an implant or remove a blood vessel blockage
  • counseling

However, lifestyle and dietary changes may also help, either alone or alongside medical treatment.


Erectile dysfunction (ED) has various possible causes, and medical treatment is available, but lifestyle factors may also help

Changes to diet, exercise, smoking, and alcohol consumption can reduce the risk of developing conditions that lead to ED, such as obesity and cardiovascular disease.

They may also help you boost your overall health and manage your stress levels, which, in turn, can contribute to a healthy sex life.

Healthy lifestyle habits that may help you manage ED include:

  • getting regular exercise
  • eating a varied and nutritious diet
  • maintaining a healthy weight
  • limiting alcohol consumption and avoiding tobacco use
  • sharing intimate times with a partner that do not involve sex

Various studies have suggested a link between ED and diet. A review published in 2018 concluded that:

  • ED is less common among those who follow a Mediterranean diet.
  • Weight loss improves ED in people with overweight or obesity.
  • Those who follow a “western diet” may have lower semen quality.

A Mediterranean diet favors fresh, plant-based foods with fish and a little meat over processed foods and a high intake of meat.

Click here for some recipes to get you started on a Mediterranean diet.


Taking care of our overall health and eating a varied and nutritious diet can help prevent or manage ED.

Some research suggests that consuming foods that are high in flavonoids, a type of antioxidant, may help reduce the risk of ED.

A 2018 study of data for males ages 18–40 showed that those who consumed 50 milligrams (mg) or more of flavonoids per day were 32% less likely to report ED.

There are many types of flavonoids, but sources include:

  • cocoa and dark chocolate
  • fruits and vegetables
  • nuts and grains
  • tea
  • wine

Flavonoids increase blood flow and the concentration of nitric oxide in the blood, both of which play a role in getting and maintaining an erection.


Flavonoids, present in cocoa and many plant-based foods, may help manage ED through improving supplies of nitric oxide and blood.

This tasty green nut may be more than a great snack.

In a 2011 study, 17 males who had ED for at least 1 year ate 100 grams of pistachios per day for 3 weeks. At the end of the study, there was an overall improvement in their scores for:

  • erectile function
  • cholesterol levels
  • blood pressure

Pistachios contain plant proteins, fiber, antioxidants, and healthy fats. These may contribute to cardiovascular health and nitric oxide production.


The antioxidants and healthy fats in pistachios may make them a good choice for people with ED.

Watermelon is a good source of lycopene, which may have various health benefits.

In a 2012 study, lycopene improved ED in rats with diabetes, prompting researchers to suggest that it could become a treatment option.

Other sources of lycopene include:

  • tomatoes
  • grapefruit
  • papaya
  • red peppers

Watermelon also contains citrulline, a compound that helps relax blood vessels and improve blood flow.

In 2018, scientists found evidence that adding a L-citrulline-resveratrol combination to PDE5i therapy (such Viagra) may help those who find standard treatment doesn’t work well enough.


Lycopene and citrulline, present in watermelon, could help prevent ED, say some studies.

Get some more tips here on foods to boost sperm quality and penis health.

In 2015, researchers analyzed data for 3,724 men to see if there was a link between caffeine consumption and ED. Results showed that ED was more likely to occur in those who consumed less caffeine.

While unable to provide a link, the results may suggest that caffeine has a protective effect.

A more recent study, published in 2018, did not find any link between coffee consumption and ED.

This research was based on self-reported data from 21,403 males ages 40–75 and included both regular and decaffeinated coffee.


It’s not clear whether coffee or caffeine affects the chances of having ED.

It’s not clear exactly how alcohol affects ED. In a 2018 study that involved 84 males with alcohol dependence, 25% said they had ED.

Meanwhile, a review published in the same year looked at data for 154,295 males.

The results suggested that moderate alcohol consumption may decrease the risk of ED, while drinking over 21 units a week, drinking very little, or never drinking appeared to have no impact.

In 2010, a study involving 816 people found that those who consumed three or more drinks a week and smoked tobacco were more likely to have ED than those who drank less.

However, nonsmokers who drank the same amount did not appear to have a higher risk.

One review article notes that over 50% of males will have some level of ED after age 40, but this rate is higher in smokers.

The authors say this is probably because smoking can damage the vascular system, which affects blood supply to the penis.

Some drugs and medications can also make ED more likely to occur, but this will depend on the drug.

Learn more in this article.


The link between alcohol and ED is unclear, although people with alcohol dependence may have a higher risk. Smoking may also be a risk factor.

According to the National Center for Complementary and Integrative Health (NCCIH), there’s not enough evidence to show that any complementary therapy can help with ED.

If you want to try an alternative option, be sure to speak to your doctor first to make sure the therapy is safe to use.

The Mayo Clinic says the following supplements may help. However, they may have adverse effects.

  • dehydroepiandrosterone (DHEA)
  • ginseng
  • propionyl-L-carnitine

The NCCIH notes that there are supplements for ED on the market, sometimes called “herbal viagra.”

They warn that these products may:

  • be contaminated
  • contain dangerously high doses of some ingredients
  • interact with other medications

They also urge people to avoid products that:

  • promise results in 30–40 minutes
  • are sold as alternatives to approved drugs
  • are sold in single doses

The Food and Drug Administration (FDA) has found that many of these products contain prescription medications. The labels on these supplements often don’t disclose all ingredients, some of which could be harmful.

Always speak to your doctor before trying a new remedy to check that it will be safe.


There’s no evidence that herbal remedies are effective, and some may be unsafe. Always speak to a doctor first.

ED affects many males, especially as they get older. There are various causes, and a doctor can help you find out why ED is occurring. This may include testing for underlying health problems.

They can also help you make a suitable treatment plan.

Combining exercise with a healthy, balanced diet will help you maintain your overall health and well-being. This can also contribute to a healthy sex life.