Medically reviewed by Kristin Hall, FNP
Written by Our Editorial Team
Last updated 9/30/2022
Finding it difficult to get and stay hard during sex? You’re not alone. Erectile dysfunction (ED), is one of the most common men’s health issues, with an estimated 30 million adult men affected in the United States alone.
Although most people associate erectile dysfunction with age, your ability to get and maintain an erection is actually determined by a large variety of factors.
These include your body weight, your diet, your blood pressure, your cardiovascular health and your nerve function. Even psychological factors, such as the total amount of stress you have as a result of your job or personal life, can have an impact on your erections.
The good news is that many of these factors are within your personal control, meaning you can take steps to protect your erections and avoid ED, often without having to use medication.
Although there’s no natural simple trick to cure ED, your habits and lifestyle both play a major role in your sexual health and erectile function.
By prioritizing healthy habits and cutting out bad ones, it’s often possible to reduce the severity of erectile dysfunction (if you already have it) or reduce your risk of developing it (if you don’t).
Below, we’ve shared 14 techniques that you can use to maintain an erection naturally, from diet modifications to regular exercise, healthy sleep habits, avoiding harmful substances and taking steps to make sure you get plenty of high quality sleep.
Many of these changes can also improve your general wellbeing and lower your risk of dealing with related health problems, such as high cholesterol or cardiovascular disease.
All of these strategies are easy to implement and align well with a healthy lifestyle, making them worth prioritizing before trying ED medication.
Being overweight or obese can negatively affect your ability to develop and maintain a healthy erection during sex.
Research has found that men with a body mass index (BMI) in the obese range are three times more likely to deal with sexual dysfunction than men with a normal BMI.
If you’re overweight (a BMI in the 25 to 30 range), your risk of developing erectile dysfunction is approximately 1.5 times higher than the risk for a person with a healthy weight.
This increased risk of ED is because obesity is closely correlated with serious health conditions such as type 2 diabetes, which can damage the nerves in your pelvis and genital area and stop you from being able to get or maintain an erection.
The best solution is to pay attention to your weight and aim to stay within the healthy range for your body type, which typically means a BMI of between 18.5 and 24.9.
Since staying at a healthy body weight is also important for your general health, maintaining a weight that’s in the healthy range is something that’s worth doing even if you don’t suffer from erectile dysfunction.
It’s worth noting that although BMI is useful, it’s far from perfect at an individual level, meaning you may want to talk with your healthcare provider about a healthy body weight range if you’re very muscular, tall or have a body type that’s not quite the average.
Your healthcare provider may suggest an alternative method of assessing your weight, such as measuring around your waist or checking your body fat percentage.
We’ve discussed several ways to get to a healthy body weight further down the page, including regular exercise and healthy eating.
Healthy, consistent erections are all about blood flow. Because of this, any condition that affects your heart, vascular system and blood circulation in general can potentially get in the way of you getting and maintaining erections.
High blood pressure is closely linked to ED, possibly because of the negative effects it can have on the health of your heart and blood vessels.
While there’s no need to obsess over your blood pressure if you’re otherwise healthy, it’s best to check your blood pressure regularly.
If your blood pressure is above the normal range, it’s important to discuss your options with your healthcare provider.
Mildly high blood pressure (such as blood pressure that’s in the prehypertension range) is often treatable by making a few small changes to your diet and lifestyle.
To reduce your blood pressure, your healthcare provider may recommend adjusting your diet to contain less sodium, increasing your exercise level or taking steps to relax and de-stress.
Since healthy erections are so dependent on blood flow, many of these changes can also help to improve your sexual performance.
In addition to lifestyle changes, there are also several medications that can reduce your blood pressure levels and improve your cardiovascular health.
Heart disease is a major risk factor for erectile dysfunction. In fact, research suggests that many men at risk of heart disease also have erectile dysfunction, making ED a common early warning sign that healthcare providers look for when judging a person’s risk of cardiovascular disease.
One early sign that you may be at risk of developing heart disease is a high level of low-density lipoprotein (LDL), or “bad cholesterol,” in your blood.
High LDL cholesterol isn’t something that you can feel on your own, making it important to have your cholesterol levels checked on a regular basis.
If you have a family history of heart disease, heart attacks or other heart conditions, or if you’re simply concerned about your cholesterol levels, you can get your cholesterol levels checked by talking to your healthcare provider.
If appropriate, they’ll take a small sample of your blood to check for low-density lipoprotein and high-density (HDL, or “good cholesterol''), as well as other substances that can provide helpful information about your cardiovascular health.
If your cholesterol levels are high, your healthcare provider might recommend making changes to your diet and lifestyle, or using medication, to bring them back down to the normal range.
Erections are dependent on strong, reliable blood flow. Because of this, the same types of food that can clog your arteries and affect your cardiovascular health can also have a negative effect on your erections and sexual performance.
For the most part, the same foods that increase your risk of heart disease can also contribute to problems with your erections and sexual health.
High-fat, high-sugar and high-calorie meals like hamburgers, pizza and fried chicken are all best avoided or eaten in moderation if you’re concerned about ED.
Instead of eating foods that can affect your cardiovascular health, it’s better to focus on eating a mix of different nutritious, healthy foods.
A study published in the Journal of Sexual Medicine showed that the Mediterranean diet, which is rich in whole grains, fish, fruit, nuts and fresh vegetables but low in red meat, might be linked to a lower incidence rate of erectile dysfunction in men.
Our complete guide to foods that may help with erectile dysfunction lists readily-available foods that you can add to your diet to improve your health and sexual function.
Mental health plays a major role in almost every aspect of your sex life and sexual performance, including your ability to get and maintain an erection.
Erections begin with mental stimulation. As your nervous system communicates with the nerves around your penis, blood flows into your erectile tissue, helping you become hard and stay hard during sex.
Some mental health conditions, such as major depression and sexual performance anxiety, can affect this process and make it more difficult for you to get an erection.
For example, research shows that sexual performance anxiety -- a type of anxiety associated with sex -- affects nine to 25 percent of men and is a common cause of psychogenic erectile dysfunction.
Techniques used to treat sexual performance anxiety include mindfulness meditation training, cognitive behavioral therapy (CBT) and medications, such as ED drugs and antidepressants.
If you have a mental health issue that’s causing ED or affecting your sex life in other ways, it’s important to seek treatment.
While some mental health issues require medication, many can be solved through options like individual or group therapy.
We offer a range of mental health services that can help you to overcome depression, anxiety and other common issues that can affect your sexual performance, including individual online counseling.
Aerobic forms of exercise, such as running, cycling, rowing or playing most sports, can improve your heart health and reduce the severity of erectile dysfunction.
A 2011 article published in the Ethiopian Journal of Health Science looked at evidence from five studies on the effects of aerobic exercise in men with ED.
The authors found that some of the studies showed a clear improvement in the symptoms of ED as men exercised, particularly over the long term.
The article concluded that aerobic training "can successfully treat ED in selected patients with arteriogenic ED" -- a form of erectile dysfunction that’s caused by poor blood flow to the tissue of the penis.
However, the researchers also noted that more research is needed on the link between regular physical activity and ED.
If you have erectile dysfunction, it’s usually possible to improve your cardiovascular health with a relatively mild exercise routine. Put more simply, there’s no need to spend countless hours of your day exercising just to reduce your risk of dealing with erectile dysfunction.
For most men, a 15-60 minute daily session of moderate intensity cardiovascular exercise (for example, jogging, cycling or walking on an incline) is enough to improve your heart health and reduce your risk of high blood pressure, heart attack and other chronic health issues.
Wondering if too much exercise can cause erectile dysfunction? There’s currently no evidence to suggest that exercising frequently may cause poor functioning downstairs, meaning you can work out without any anxiety about your sexual performance.
Your pelvic floor muscles -- the group of muscles located beneath your penis, bladder, intestines and rectum -- play a key role in several essential bodily functions, including your ability to hold in urine.
There’s also some evidence that weak pelvic floor muscles might contribute to weaker erections that are more difficult to maintain during sex.
Research suggests training your pelvic floor muscles using kegel exercises may help to improve your natural erectile function and prevent erectile dysfunction symptoms.
In a study published in the British Journal of General Practice, a team of experts found that men with ED who performed pelvic floor exercises showed improvements in erectile function over the course of three months, with the results improving even further after six months of treatment.
You can perform kegel exercises by tightening your pelvic floor muscles, counting up to three to five, then relaxing them again. Most people repeat this process 10 times in the morning, noon and at night over the course of several weeks.
Over time, you may notice that you feel more in control of your erections, and that you’re better able to avoid feeling excessively stimulated during sex.
In addition to potentially improving your erections, research suggests that pelvic floor exercises may also increase your ability to control ejaculation and stop common sexual dysfunctions such as premature ejaculation (PE).
Our guide to pelvic floor exercises for men goes into more detail about how you can use pelvic floor training to strengthen your erections and sexual function.
Many steroids, including testosterone, can reduce your body’s ability to produce hormones that are critical for your sexual health and function. This can increase your risk of developing sexual performance issues such as erectile dysfunction.
In a study published in the journal Translational Andrology and Urology, experts surveyed users of anabolic steroids to assess the potential impact of steroid use on male sexual health.
They found that many steroid users reported decreased libido and erectile dysfunction after they stopped using artificial testosterone.
These issues were more likely when steroids were used for the long term, as well as among the men who used steroids frequently.
If you’re concerned about your erectile function, try to avoid testosterone and other steroids that can affect your body’s natural hormone production. Instead, try using natural techniques to raise your testosterone levels and improve your physical performance.
Although the link between testosterone and ED isn’t completely clear, low levels of testosterone may affect your level of interest in sex and have a modest impact on your ability to get and keep an erection during sex.
Your testosterone levels fluctuate naturally based on several different factors, from your diet and activity level to your sleep habits.
They also decline with age, with research showing a progressive decline in serum testosterone levels as men get older.
Common symptoms of low testosterone include loss of muscle mass, an increase in your level of body fat, changes in your mood, memory issues and a lethargic, fatigued feeling.
If you’re worried about low testosterone, it’s best to talk to your healthcare provider or schedule an appointment with a urologist. It’s easy to check your testosterone levels with a blood test.
If you have low testosterone, your healthcare provider may prescribe medication (referred to as testosterone replacement therapy) or recommend that you make certain changes to your habits and lifestyle.
Using testosterone therapeutically is very different from the type of steroid use we mentioned in the section above. If you’re prescribed testosterone, your healthcare provider will work with you to make sure you’re within the normal testosterone range for men of your age.
Simple habits, such as exercising often, reducing stress and getting a good night’s sleep, can all help to increase your testosterone levels. Many of these habits are also ideal for improving your general health, sexual performance and wellbeing as a man.
The quality of your sleep has a huge impact on just about every aspect of your health, including your erections and general sexual performance.
In fact, research shows that common sleep disorders such as insomnia, shift work disorder and obstructive sleep apnea are all linked with erectile dysfunction and other urological disorders in men.
Other research has found that just one week of low quality sleep can result in a significant drop in your body’s production of testosterone -- a vital hormone for maintaining a strong and healthy sex drive.
Put simply, not only are you less likely to have reliable erections when you don’t sleep well, but you may also be less likely to feel interested in sex in the first place.
While science hasn’t yet revealed the perfect amount of sleep for an optimal sex drive, it’s best to aim for the CDC’s recommendation of seven or more hours per night.
If you find it difficult to doze off at a normal time, or have issues staying asleep at night, making a few simple changes to your lifestyle can often help you to maintain good sleep habits.
These include following a regular bedtime, avoiding caffeine, exercising regularly and switching off phones, tablets and other bright devices an hour or two before bedtime.
We’ve discussed these in more detail in our full list of evidence-based methods for falling asleep faster and getting a good night’s sleep.
Healthy erections are all about blood flow. Because smoking damages the blood vessels that supply blood to your penis, it can greatly increase your risk of developing ED.
Research into the relationship between smoking and ED has found that regular smokers have an elevated risk of developing erectile dysfunction compared to non-smoking men of the same age.
The same research shows that many men who smoke are able to improve their erectile function and sexual performance by quitting.
If you’re a smoker, kicking the habit might seem like a daunting task. However, it can offer real benefits both for your sexual function and for your general quality of life.
Beyond sex, quitting smoking has numerous other benefits, from reducing your risk of cancer and heart disease to improving your blood flow, reproductive health and lowering your risk of respiratory issues such as chronic obstructive pulmonary disease (COPD).
These health benefits mean that quitting smoking is something that’s worth trying even if you don’t have erectile dysfunction.
Interestingly, nicotine itself is closely associated with ED, meaning that alternative methods of ingesting nicotine such as vaping or using nicotine patches may not result in improvements in your erectile health.
One study published in the Journal of Sexual Medicine, for example, found that nicotine lowers the erectile response to stimulation and decreases sexual arousal.
This means that the best approach to ED treatment for smokers isn’t just to quit smoking, but to quit nicotine altogether.
Our guide to smoking and erectile dysfunction goes into more detail about the close relationship between nicotine and ED, as well as other sex and reproduction-related health risks associated with smoking.
Do you drink alcohol at night or on the weekend? Reducing the amount of alcohol you drink is a straightforward way to improve your erections and your general health and wellbeing.
While alcohol isn’t directly linked to erectile dysfunction, people with alcohol dependence are far more likely to display one or more signs of sexual dysfunction.
In one study from 2007, researchers found that the amount of alcohol a person consumes is the most significant predictor of developing sexual dysfunction.
The most common forms of sexual dysfunction observed in the study were erectile dysfunction, premature ejaculation and low sexual desire.
Although there’s no need to quit drinking entirely, limiting your alcohol consumption can improve your sexual performance and overall health.
Try to stick to the CDC’s guidelines and limit your alcohol intake to a maximum of two servings a day (for example, two normal-sized glasses of wine or 12-ounce glasses of beer) to reduce your risk of dealing with alcohol-induced ED.
While the link between porn and erectile dysfunction isn’t crystal clear, some research suggests that watching too much porn may contribute to ED.
For example, research from the Naval Medical Center of San Diego has shown that regular porn watching could potentially be a cause of erectile dysfunction.
The link between porn consumption and ED appears to be psychological rather than physical -- possibly a result of porn’s novelty and potential for easy escalation changing the way men (and women, who obviously aren’t affected by ED) view sexual activity.
Right now, research into the link between pornography and ED is limited. However, the research that currently exists suggests that taking a break from porn consumption could improve this form of erectile dysfunction.
In short, reducing the amount of time you spend watching porn could be a potential way to solve erection problems, especially if you find yourself less interested in real sexual activity as a result of watching too much porn.
Finally, another way to reduce your risk of ED and maintain stronger erections is to talk openly with your sexual partner.
Communicating with your partner can help to reduce anxiety in your relationship, which may be a factor in erectile dysfunction. It’s also a great way to work together to overcome problems that can affect your connection and sexual response.
If you occasionally get weak erections or struggle to remain hard at all, letting your partner know about what’s going on and why you think it’s happening may also make it easier for them to help you feel comfortable during sex.
Put simply, talking openly with each other can help you to get rid of feelings of anxiety and make it easier to maintain a normal sex life.
Our guide to dealing with erectile dysfunction in a relationship shares a few techniques that you can use to bring up the topic of ED with your partner, all without any awkward moments.
Although erections might seem simple, your body does some serious work behind the scenes to help you get and stay hard during a sexual encounter.
If you find it tough to get and maintain a full erection during sex, the habits listed above can help you to improve your overall health, maintain harder erections and reduce your risk of developing erectile dysfunction over time.
If you have persistent ED, or find that lifestyle changes alone aren’t quite enough to prevent you from dealing with weaker erections than you’d like, you may want to consider taking medication to improve your erections.
We offer several evidence-based ED medications online, including sildenafil (Viagra®), tadalafil (generic Cialis®), vardenafil (Levitra®) and avanafil (Stendra®), which are available following a private online consultation with a physician who will determine if a prescription is appropriate.
These medications can make a real difference in the strength and reliability of your erections, as well as your general sexual performance.
You can also find out more about the causes of ED, common risk factors and the most effective treatment options in our full guide to erectile dysfunction.