Medically reviewed by Angela Sheddan
Written by Our Editorial Team
Last updated 5/12/2022
Dealing with an upset stomach is never an enjoyable experience. Whether you’re dealing with a mild stomach ache caused by eating something a little “off” or a more persistent stomach illness, the experience can be inconvenient at best and frustrating and uncomfortable at worst.
If you’re prone to stomach problems, you may have noticed that it’s difficult to get and maintain an erection when you’re experiencing symptoms.
Can stomach problems cause erectile dysfunction? While there doesn’t seem to be a direct link between your digestive system and your sexual performance, some research does suggest that chronic digestive issues may be a risk factor for erectile dysfunction, or ED.
Below, we’ve looked at the potential link between certain digestive problems and sexual function issues such as erectile dysfunction, as well as other common causes of ED.
We’ve also explained your options for treating erectile dysfunction, from medications to changes that you can make to your habits and daily life.
Erectile dysfunction is a common condition in which you might find it difficult to get or maintain an erection that’s firm enough for satisfying, pleasurable sex. It can affect men of all ages and be a short-term issue that occurs from time to time or a long-term, persistent one.
If you have erectile dysfunction, you might find that you can get an erection sometimes, but not every time you want to have sex. You might be able to get a natural erection, but find it difficult or impossible to maintain it during sex.
Finally, if your erectile dysfunction is very severe, you might find it difficult to develop an erection at all, even when you’re in the mood for sex.
ED is highly common. According to the National Institute of Diabetes and Digestive and Kidney Diseases, approximately 30 million men in the US alone are affected by some degree of erectile dysfunction.
Our full guide to erectile dysfunction provides more information about ED symptoms, causes of erectile dysfunction and potential treatment options.
Currently, there’s only limited research available about any potential link between stomach and digestive system health and erectile function.
Before we get into the specifics of your stomach function and sexual health, it’s important to go over the basics of how erections actually occur, as well as the various factors that may prevent your penis from functioning properly during sex.
Erections depend on a combination of stimulation and blood circulation. When you start feeling sexually aroused, messages from your nervous system begin to stimulate the tissue inside your penis, causing the penile tissue to relax.
This tissue — a pair of soft, sponge-like bodies called the corpora cavernosa — begins to receive blood from your circulatory system. The blood vessels that supply your penis expand, allowing for consistent blood flow that causes the tissue inside your penis to enlarge and harden.
As the blood supply to your penis increases, the tunica albuginea — a tough, fibrous membrane that wraps around the corpora cavernosa — traps the blood inside your penis, resulting in a firm erection sufficient for penetrative sex.
After you reach orgasm and ejaculate, the same process happens in reverse, with the muscles of your penis contracting and blood flowing out.
For the most part, your stomach and other parts of your gastrointestinal tract aren’t involved in this process. However, some scientific research suggests that certain digestive diseases might be linked to erectile dysfunction and other forms of sexual dysfunction.
For example, inflammatory bowel disease (IBD) — an illness that involves inflammation of and damage to the gastrointestinal tract — is associated with several sexual issues, including weak sexual desire and erectile dysfunction.
In fact, in a study of men with newly diagnosed inflammatory bowel disease, researchers found that 94 percent were affected by some degree of ED. The team of researchers also found that erectile dysfunction correlated with age and reduced physical and mental health.
While IBD is closely linked with ED, researchers aren’t aware of any direct physical link between digestive problems and erectile dysfunction. Put simply, although they’re linked, there isn’t yet a clear stomach health or digestive factor that seems to directly cause erection problems.
Experts have speculated that the link could be caused by psychological issues, such as sexual performance anxiety and depression.Anxiety, depression and body image issues are common in people with IBD, especially active IBD that causes ongoing symptoms.
There’s also the discomfort factor, which can be a significant issue when you’re suffering from a stomach problem. When you need to go to the bathroom frequently, feel uncomfortable and just don’t quite feel right, it’s easy for your sex drive and general sexual activity to suffer.
As well as irritable bowel syndrome and other digestive issues, many physical health conditions and psychological factors can either cause or contribute to erectile dysfunction.
High blood pressure
Blood vessel disease
Multiple sclerosis (MS)
Atherosclerosis (clogged arteries)
Chronic kidney disease
Surgery for prostate cancer, radiation treatment and other prostate cancer treatment
Injuries that affect your penis, prostate, bladder and/or spinal cord
Low hormone levels, such as reduced testosterone production
Nerve damage to your pelvis and surrounding area
Type 2 diabetes
Several prescription medications, including those typically used to treat the medical conditions above, could also increase your risk of developing erectile dysfunction.
For example, ED is a known side effect of antidepressant medications, anti-androgens, anxiety and sleep medications, appetite suppressants, medications for stomach ulcers and some types of blood pressure medication.
Some of these medications may also cause stomach problems. For example, many of the most common antidepressants used to treat major depressive disorder (MDD) and anxiety disorders are associated with gastrointestinal issues such as diarrhea, vomiting and abdominal pain.
When these side effects develop at the same time, it may be difficult to tell if they’re side effects of medication or if the ED and gastrointestinal symptoms are related.
Sometimes, erectile dysfunction is either caused or made worse by a psychological issue. You may have a higher risk of developing ED if you have:
Poor body image
Worries about sexual failure
Feelings of guilt about sexual intercourse
Acute or chronic stress
Our guide to the psychological causes of ED discusses these factors and the impact they can have on your sex life in more detail.
Finally, your lifestyle and general wellbeing can have a large impact on your sexual health and function, including your erections. Lifestyle factors that may cause ED include:
Using illegal drugs
Abusing prescription drugs
Not getting enough physical activity
Being overweight or obese
Although the scientific link isn’t crystal clear, there’s also some evidence to suggest that overuse of pornography might play a role in sexual issues, including porn-induced ED.
Our full guide to the causes of erectile dysfunction discusses these risk factors in more detail, as well as the impact that they can have on your erections, general sexual performance and quality of life.
While erectile dysfunction can be annoying to deal with, the good news is that it’s almost always a treatable condition.
Today, a variety of options are available to treat ED, including oral medication designed for use before sex, simple lifestyle changes and even safe, proven options for treating severe ED that doesn’t respond well to conventional treatments.
If you have a digestive health issue, it’s best to start by talking to your healthcare provider and working on a treatment plan.
Most digestive diseases are treatable, either through the use of medication or changes to your eating habits and general lifestyle. Your healthcare provider will be able to inform you about the best options based on your symptoms and specific needs.
If you feel embarrassed to talk to your regular doctor about your symptoms, you can talk with a licensed healthcare provider online using our primary care services.
While treating your digestive health issues doesn’t guarantee that your erectile dysfunction will go away, it could improve your quality of life and help to reduce the severity of common issues such as sexual performance anxiety and low self-esteem.
When erectile dysfunction is caused by a physical issue, treating the underlying cause may help to improve your erections and sexual health. Make sure to get a regular health checkup with any exams and screenings that are appropriate for you based on your age and health status.
During a checkup, your healthcare provider might detect underlying conditions that can cause or worsen ED, such as high blood pressure or low testosterone levels.
Many issues that may cause ED are most effectively treated when they’re detected early, letting you enjoy better sexual performance and a healthier daily life.
One of the most effective ways to treat erectile dysfunction is by using ED medication, such as sildenafil (the active ingredient in Viagra®), tadalafil (Cialis®), vardenafil (Levitra®) or avanafil (Stendra®).
These medications, which belong to a class of drugs called PDE5 inhibitors, work by making it easier for blood to flow to the erectile tissue in your penis. This helps you to get and stay hard when you’re sexually aroused.
Most ED medications can be taken between 30 minutes and an hour before sex, making them convenient options for alleviating erectile dysfunction and improving your performance.
We offer a range of ED medications online, following a consultation with a licensed healthcare provider who will determine if a prescription is appropriate.
Our guide to what to expect from erectile dysfunction medication offers more information about how common ED drugs work, how you can take them to improve your erections, their potential side effects and more.
Making changes to your habits and lifestyle can improve your health and reduce the severity of erectile dysfunction. Try the following changes and habits, either on their own or in combination with ED medication, to improve your erections and sexual performance:
Keep yourself physically active. Regular physical activity improves blood circulation, including to the erectile tissue in your penis. This may help you to get and maintain an erection when you’re sexually aroused.
Try to maintain a steady activity level by getting at least 150 minutes of aerobic exercise (for example, brisk walking or a bike ride) and two muscle-strengthening workouts every week.
Try to maintain a healthy body weight. Weight and ED are closely linked — in fact, one study found that men who are overweight or obese have a significantly higher risk of ED than men in the healthy weight range based on BMI.
While there’s no need to look like an athlete or fitness model, aiming for a healthy weight may help to prevent ED and improve your sexual function.
If you smoke, try to quit. Smoking can increase your risk of vascular disease and limit blood flow in your body.Smoking is also closely associated with ED. If you smoke and have erectile dysfunction, try your hardest to kick the habit for good.
Limit your alcohol consumption. Excessive alcohol consumption is closely associated with sexual dysfunction, including alcohol-induced ED. While it’s okay to drink, it’s best to do so in moderation, especially if you’re concerned about your sexual function.
Try to follow the CDC’s recommendations by limiting your alcohol intake to no more than two standard-sized alcoholic drinks per day.
Avoid illegal drugs. Many illegal drugs can affect your sexual function and may make it harder to get an erection. Avoid using any illicit drugs and seek expert help if you have a substance use disorder.
Our list of ways to naturally protect your erection shares other habits and lifestyle changes that you can use to reduce the severity of ED and improve your sexual function.
Can bowel problems cause erectile dysfunction? Research certainly suggests that they’re a risk factor, although the total amount of study data available is limited.
It’s also possible for some medications that cause bowel and stomach issues, such as selective serotonin reuptake inhibitors (SSRIs) and other antidepressants, to contribute to erection issues and other sexual performance problems.
If you have ED and think stomach issues could be to blame, it’s best to talk to your primary care provider. They’ll be able to check you for any digestive problems that could affect your erections and general sexual health.
You can also access proven, evidence-based erectile dysfunction medication online through our telehealth platform.
Want to learn more about dealing with ED? Our guide to the most common erectile dysfunction treatments and drugs explains everything you need to know about treating ED with medication, from common drugs to dosages, potential side effects and more.