Sexual Wellness

Can a Hernia Cause Erectile Dysfunction?

Fact Checked

Do hernias cause ED? Find out in this guide to how hernias affect your sexual health.

Last Updated: 04/23/2025

Written by

Kimberly Wilkes

If you have a hernia, we don’t have to tell you how much pain they cause. They get in the way of hiking, running, working out at the gym, and just about any other exercise you enjoy. 

If you have a physical job, a hernia might also impact your work performance. The question is: Can inguinal hernias cause erectile dysfunction, too?

If you suffer from this painful condition, you’re not alone. According to the National Institute of Diabetes and Digestive and Kidney Diseases, almost 25% of men are expected to suffer from an inguinal hernia in their lifetime.(1) 

Inguinal hernia repairs are the most common surgical procedure performed with 800,000 surgeries performed every year.(2)(3)

In this blog post, we’ll take a deep dive into hernias and erectile dysfunction. But first, let’s find out exactly what are hernias and what causes them?

What Is a Hernia?

A hernia happens when an internal organ pushes through a weak spot in muscle or tissue, usually in the abdominal wall or groin, but they can also happen in the lower chest through the diaphragm.(4) 

Hernias lead to a bulge that appears or disappears depending on what activities you’re engaged in or what position you’re in. 

Types of Hernias

The different types of hernias include:

  • Inguinal  -– This is the most common type. Most hernias, about 75%, fall into this category. With an inguinal hernia, a section of the bowel bulges into the inguinal canal, a part of your body located along the inner thigh. 

  • Hiatal  – Although not as common as inguinal hernias, hiatal hernias occur in a fair number of people. They happen when the opening in the diaphragm becomes wider. This leaves the top of the stomach susceptible to protruding through the opening into your chest. 

  • Femoral – This is a less common type of groin hernia. It takes place in the femoral canal, which is underneath the inguinal canal. 

  • Incisional – These types of hernias happen as a side effect of surgery, usually abdominal surgery. They occur when a surgical incision weakens over time, causing tissue to poke through. 

  • Perineal  –  A rare type of hernia, perineal hernias happen when organs or tissue protrudes through the pelvic floor into the abdominal cavity. 

  • Congenital hernias –  These types of hernias are present from birth and include congenital diaphragmatic hernias and umbilical hernias. 

In this article, we’ll focus mainly on whether inguinal hernias, the most common type, affect sexual function and answer the question “Can an inguinal hernia cause ED?”

Causes of Inguinal Hernias

The most common underlying cause of inguinal hernias is aging, since over your lifetime, wear and tear can break down tissue, allowing organs to protrude. 

Some other factors and health conditions that increase your risk of developing an inguinal hernia include:(5)

  • Chronic obstructive pulmonary disease

  • Ehlers-Danlos syndrome

  • Marfan syndrome

  • Obesity

  • Chronic cough

  • Heavy lifting 

  • Straining during constipation 

Can an Inguinal Hernia Cause ED?

Hernias don’t directly cause erectile dysfunction, but they can still directly affect sexual function in several ways. 

First, being in pain can really put a damper on sexual desire and your quality of life. So if the hernia is painful, you may not feel like having sex or it can interfere with sexual activity when it starts to happen.

Second, obesity is a risk factor for both hernias and erectile dysfunction. So even though the hernia itself isn’t causing your ED, both of these conditions have a common cause that impacts sexual health.

A hernia also can cause an unattractive bulge that leads to some men feeling self-conscious. This can lead to performance anxiety and erectile dysfunction. 

In addition, inguinal hernias or surgical complications can indirectly affect testicular perfusion, also known as testicular arterial perfusion, the supply of blood to the testicles. Mesh repair surgery also may be associated with male infertility in some patients.(6)

Hernia Repair Surgery and Erectile Dysfunction

The most common way that a hernia can affect sexual performance is following inguinal hernia repair surgery. 

Sexual performance is an important consideration after hernia repair surgery because the operation is performed in the inguinal region. This area is near the testicles and nerves that play a role in erections. 

Consequently, repair of inguinal hernia is a risk factor for damage to sexual organs, although the risk is low.  

There is also the rare possibility that in mesh repair of inguinal hernias the implanted mesh can cause hardening or thickening of tissues or shrink as your body reacts to  foreign tissue. The hardening or thickening of tissue can affect nerves and other parts of the body important for sexual health. 

Both of these scenarios—damage during hernia repair or effects of the mesh—could impact sexual function. 

The good news? Any ED that occurs after surgical inguinal hernia repairs is usually caused by the post-surgery pain and is temporary for most men. 

What’s more, over the long term, undergoing hernia surgery often has a beneficial effect on sexual satisfaction and improves sexual function in male patients who had erectile dysfunction before their surgery. 

One study measured erectile and intercourse function, overall satisfaction, sexual desire, and orgasm satisfaction using the International Index of Erectile-function Questionnaire (IIEF) scoring system one and six months after inguinal hernia surgery. By the sixth month after surgery, all the measurements of sexual function improved.(7) 

In the same study, 36.1% of men who had hernia surgery attributed their improved sexual function six months after surgery to the disappearance of cosmetic issues including hernia-related bloating and a scar from the operation.(7) 

In addition, 75% of the men said their sexual function improved due to a decrease in pain. 

Some men continue to suffer from chronic groin pain a year or more after inguinal hernia operations. 

One study of 538 men found that 44 (8.2%) of the study participants reported chronic pain during sexual activity, a mean of 33 months after surgical repair.(8)  Of the 44 men, 33 of them experienced sexual dysfunction along with the pain. 

Risks of Avoiding Hernia Surgery 

Because hernia repair is painful and can temporarily lead to problems with sexual intercourse, it’s tempting to put it off for as long as possible or not have surgery at all. However, this isn’t always a good idea. 

If the hernia isn’t bothering you, talk to your doctor about waiting for hernia mesh surgery. 

The biggest risk in waiting to repair it is the possibility that fatty tissue or the exposed organ associated with the hernia can get stuck, possibly choking off blood supply. This leads to emergency surgery.

When it gets to that stage, the surgery is more complicated and the recovery time might be longer than if your doctor had operated earlier. 

Remember, when you go through elective surgery as opposed to emergency surgery, your sex life will probably only take a hit for three or four weeks. 

Frequently Asked Questions About Hernias and ED

Can a hernia cause a man to not get hard?

Although hernias are not directly related to erectile dysfunction, since they cause pain and discomfort, they can distract you enough to cause sexual dysfunction. Hernia repair can take away this distraction and restore your erections.

What are the symptoms of inguinal hernias in males?

Symptoms of hernias include:

  • A bulge in your pubic area, especially noticeable when you cough or strain.

  • Burning or aching pain around the bulge.

  • Pain or discomfort in your groin area.

  • Feeling a heavy sensation or weakness in your groin.

If the protruding intestine descends down into your scrotum, there may be pain and swelling around your testicles.

How long does erectile dysfunction last after hernia repair surgery?

Men are advised to avoid sex for one to three weeks after hernia repair surgery. During this time you will probably be sore and not want to have sex anyway. 

Beyond three weeks, if you are experiencing erectile dysfunction, it is usually temporary and it will improve as your pain goes away. In fact, undergoing hernia surgery often improves sexual function in men who had erectile dysfunction before their surgery.

Sources:

1. https://www.ncbi.nlm.nih.gov/books/NBK513332/

2. https://pmc.ncbi.nlm.nih.gov/articles/PMC10389329/

3. https://www.ncbi.nlm.nih.gov/books/NBK513332/

4. https://my.clevelandclinic.org/health/diseases/15757-hernia

5. https://www.ncbi.nlm.nih.gov/books/NBK513332/

6. http://pubmed.ncbi.nlm.nih.gov/27915384/

7. https://pmc.ncbi.nlm.nih.gov/articles/PMC4986302/

8. https://pmc.ncbi.nlm.nih.gov/articles/PMC5868453/