Can hernia surgery cause impotence? It is not a known effect of the operation. Erection problems are not among the risks healthdirect lists for an inguinal hernia repair, and studies that scored men's erections before and after the repair found them unchanged or slightly better. What a small share of men do get is pain in the groin or genitals during sex, and for many it eases with time.
Does a hernia repair affect erections?
Not in the studies that measured it. The risks healthdirect lists for an open inguinal hernia repair in men include continued pain in the groin, "Damage to nerves that supply the skin around your groin, leading to a numb patch" and damage to the blood supply of the testicle — "Your testicle on the same side as the procedure may shrink and not work" — but not erection problems (healthdirect — open inguinal hernia repair). In a 2026 study of 126 men who filled in a standard erection questionnaire (the IIEF-5) in the month before the operation and again six months after it, erectile function "appeared to be largely preserved", with a small average improvement (Sayur et al., J Clin Med 2026). In a smaller study of 47 men, erection scores were higher one and six months after the repair than before it (Sönmez et al., Cent European J Urol 2016).
Why do some men have pain during sex after a hernia repair?
Nerve damage during the operation is one of the likely reasons. A Danish survey of 1,015 men aged 18 to 40, a year or more after their inguinal hernia repair, found that 22.1% had some pain during sexual activity — mild or occasional for most — and that 2.8% said the pain limited their sex life to a moderate or severe degree. The authors put the clinically significant problem at "about 3% of younger male patients" and named nerve damage among the most likely causes (Aasvang et al., Pain 2006). After keyhole repair, a second Danish survey found pain from the groin or genitals during sex in 10.9% of men, 2.4% with a moderate or severe effect on their sex life, and less of it in men whose operation was longer ago (Bischoff et al., Surg Endosc 2012). This is pain, not erectile dysfunction. healthdirect notes that groin pain after the repair "is usually mild but can be severe" and may need more treatment, so tell your surgeon or GP if it lasts.
When can you have sex after hernia surgery?
healthdirect does not give a time for sex. Its guide says you should be able to go home the same day, "return to work and normal activities after 2 weeks to 4 weeks, depending on your recovery and the type of work you do", and not lift anything heavy for at least 6 weeks (healthdirect). Ask your surgeon, who knows which repair you had and how you are healing.
Does keyhole or open surgery make a difference?
Early on, perhaps; after a few months, no. In a trial of 176 men randomly assigned to a keyhole (TEP) or an open (Lichtenstein) repair, sexual function scores 7 and 30 days after the operation were better in the keyhole group, but the difference was gone by 90 days (Isil and Avlanmis, Surg Endosc 2020). At six months, the 2026 study found no difference in erection scores between the two (Sayur et al.).
Can a hernia itself get in the way of sex?
For some men it does, and the repair then helps. In a German study of 73 men, 11 (15%) who had sexual problems before the operation had normal sexual function afterwards; 10 others reported limits on sex from groin pain or numbness after the repair, and in 6 of them it recovered by itself within a year (Zieren et al., Am J Surg 2001). A hernia that traps part of the bowel and cuts off its blood supply "is a medical emergency": healthdirect says to seek urgent care for a hernia with groin pain, vomiting or a purple, red or pale colour, and to call triple zero (000) for severe abdominal pain (healthdirect — inguinal hernia).
What if your erections change after the operation?
See your GP. Erection problems have many possible causes, physical and psychological, and are often the first sign of cardiovascular disease, diabetes, high blood pressure or high cholesterol (healthdirect — erectile dysfunction). Prostate operations are different, because erection problems are a known risk there: how common is erectile dysfunction after a prostatectomy? If you have difficulty passing urine after a hernia repair, healthdirect says you may need a catheter in your bladder for 1 to 2 days — see what to expect once the catheter comes out. For ED tablets around an operation, see can you take ED medicines before surgery? and can you take Viagra after surgery?
The short answer
A hernia repair is not a known cause of impotence: erection problems are not among its listed risks, and the studies found erections unchanged or better afterwards. About 3 in 100 younger men have groin or genital pain during sex that limits their sex life, and it often eases with time. The other groin operation men ask about is covered in can a vasectomy cause erectile dysfunction or impotence?, and every operation in our guide to erectile dysfunction after surgery.



