TL;DR: Erectile dysfunction after heart bypass surgery is common but the outcome varies significantly between men. Studies report ED in up to 38.5% of men after CABG, and the evidence is genuinely mixed — some research shows improved erectile function after surgery as blood flow improves, while other studies show new or worsened ED, particularly linked to the cardiopulmonary bypass machine’s effect on testosterone. Anxiety, depression, and pre-existing cardiovascular risk factors all influence outcomes.

 

Heart bypass surgery is performed to restore blood flow to a heart starved of oxygen by blocked coronary arteries. Many men reasonably expect that fixing their heart’s blood supply might also fix any erectile difficulties they had beforehand. The reality, based on the research, is more complicated — and worth understanding honestly, whether you are preparing for surgery or recovering from it.

 

How Common Is Erectile Dysfunction After Heart Bypass Surgery?

Erectile dysfunction has been reported in a substantial proportion of men following coronary artery bypass graft (CABG) surgery — one study found ED in 38.5% of men afterwards, with higher rates in those with anxiety, depression, peripheral vascular disease, diabetes, hypertension, and a smoking history.

What is easy to overlook is how much ED already existed before the operation. Research published in PMC examining sexual dysfunction patterns after cardiac surgery cites a study finding that around 33% of men had poor erectile function before their CABG operation. This makes sense clinically — coronary artery disease severe enough to require bypass surgery and erectile dysfunction share the same underlying pathology. Both conditions stem from atherosclerosis narrowing arteries; the coronary arteries and the penile arteries are simply different vessels affected by the same disease process.

This matters for how you interpret your own situation. A man who has ED after his bypass surgery may be continuing with a problem that started years before his heart disease was even diagnosed — not necessarily experiencing something new caused by the operation itself.

 

Why the Research on ED After Bypass Surgery Is Genuinely Mixed

This is one of the more honestly conflicting areas of medical literature, and pretending otherwise would not serve you well.

Some studies find that erectile function improves after CABG. A prospective cohort study of 426 men assessed using the IIEF-5 questionnaire before and six months after on-pump CABG surgery found a small but statistically significant improvement in erectile function scores following surgery — consistent with the idea that restoring blood flow to the heart, and improving overall cardiovascular fitness, can have a modest positive knock-on effect on erectile blood flow too.

Other studies find the opposite. Research published in ScienceDirect examining sexual dysfunction before and after CABG cites findings that after exposure to cardiac interventional procedures including CABG, 25% of men lost their sexual function completely, and 50% reported sexual function worse than before the procedure. The same paper found increased rates of erectile dysfunction, premature ejaculation, and loss of libido following cardiac surgery in another cohort.

These findings are not simply contradictory noise — they likely reflect genuine differences between studies in surgical technique, patient population, timing of assessment, and the psychological context of the surgery. A 58-year-old man with well-controlled diabetes who recovers quickly and returns to exercise confidently is in a very different position to a 70-year-old man with a long hospital stay, ongoing breathlessness, and significant anxiety about his heart. Both may have had the same operation; their erectile function outcomes are likely to look very different.

 

How the Heart-Lung Machine Itself May Affect Erectile Function

One mechanism specific to bypass surgery — separate from the vascular disease itself — deserves particular attention: the effect of cardiopulmonary bypass on hormone levels.

During on-pump CABG, the heart is temporarily stopped and a heart-lung bypass machine takes over the work of circulating and oxygenating blood. The ScienceDirect research notes that cardiopulmonary bypass can affect serum levels of androgenic hormones, including testosterone — the hormone central to libido and erectile function. Normal sexual function requires both intact circulation and a normal hormonal profile, and the bypass machine has the potential to disrupt the second of these even while surgery addresses the first.

This is one reason off-pump CABG — performed on a beating heart without the bypass machine — is sometimes discussed as having a different sexual function profile to on-pump surgery, though direct comparative research specifically on this point remains limited. If hormonal disruption from cardiopulmonary bypass is contributing to your ED, it is, in principle, reversible — testosterone levels that fall around the time of major surgery often recover over subsequent months, though this should be confirmed with a blood test rather than assumed.

 

The Psychological Weight of Major Heart Surgery on Sexual Function

Heart bypass surgery is not a minor procedure, and its psychological impact on sexual confidence is significant and well documented.

Higher rates of ED after CABG were specifically associated with higher levels of anxiety and depression in the men studied. This is unsurprising. A man recovering from major cardiac surgery is often anxious about his heart, uncertain about what physical exertion is safe, and dealing with a body that feels less reliable than it did before. Some men develop a specific fear that sexual activity — which does raise heart rate and blood pressure — might trigger a cardiac event, even when their cardiac rehabilitation team has confirmed they are fit for normal activity.

Body image plays a role too. A sternotomy scar down the centre of the chest is a visible, permanent reminder of major surgery, and some men report reduced sexual confidence related to this alone, independent of any physical erectile difficulty.

The same research found that a longer hospital stay and a higher BMI were both associated with greater ED risk after surgery — likely markers of a more complicated recovery and poorer baseline health, rather than independent causes in themselves.

 

When Does Erectile Function Typically Return After Bypass Surgery?

There is no single timeline, and being told to expect one specific recovery pattern would be misleading.

Research following patients at different intervals — 4 to 10 weeks, 3 to 6 months, and 12 months after surgery — generally finds that resumption of social and sexual activity is one marker of overall recovery from cardiac surgery. For men whose ED was primarily related to anxiety, deconditioning, and the physical limitations of early recovery, improvement often becomes noticeable as general fitness, confidence, and exercise tolerance return — commonly somewhere in the 6 to 12 week range, though this varies by individual recovery pace.

For men whose ED has a stronger vascular or hormonal basis, improvement — where it occurs — tends to develop more gradually over the 3 to 6 month mark, in line with broader cardiovascular recovery.

If ED has not improved by around six months after surgery, it is reasonable to treat it as a persistent issue warranting its own assessment, rather than something that will simply resolve given more time.

 

Is It Safe to Have Sex After Heart Bypass Surgery?

For most men, yes — once sufficiently recovered. The general benchmark used by cardiac rehabilitation teams is exercise tolerance: if you can comfortably climb two flights of stairs without chest pain, significant breathlessness, or excessive fatigue, you are generally considered fit enough for sexual activity, which places a broadly similar demand on the heart.

This assessment should come from your cardiac team, not be assumed independently — every recovery is different, and your surgeon or cardiologist will give you guidance specific to your procedure and progress.

PDE5 inhibitors such as sildenafil and tadalafil are generally considered safe for most men after CABG and are commonly used to treat post-surgical ED. The one absolute and important exception is nitrate medication — if you are taking nitrates for angina, PDE5 inhibitors are contraindicated, as the combination causes a dangerous drop in blood pressure. Always confirm your full medication list with your GP or cardiologist before starting any ED treatment after cardiac surgery.

 

What to Do If ED Persists After Bypass Surgery

If erectile dysfunction has continued for several months after your operation, it is worth treating as its own problem rather than waiting indefinitely for it to resolve.

A proper assessment at this stage should include testosterone (particularly relevant given the cardiopulmonary bypass mechanism described above), a review of how your overall cardiovascular recovery is progressing, blood pressure, blood glucose, and a frank conversation about anxiety or low mood, which are common and treatable contributors in this specific population.

Treatment remains available and effective even after cardiac surgery. PDE5 inhibitors, addressing any underlying hormonal deficiency, and psychological support where anxiety or depression are significant factors, can all meaningfully improve outcomes. ED after bypass surgery is not something men need to simply live with.

At The Private GP in Birmingham, a private GP consultation and private blood tests can check testosterone and relevant recovery markers, working alongside — not instead of — your existing cardiac care team. Same-day appointments available, no referral needed.

 

Frequently Asked Questions

How long after bypass surgery can I have sex?

This depends on your individual recovery and should be confirmed with your cardiac team. A common general benchmark is the ability to climb two flights of stairs comfortably without chest pain or significant breathlessness — typically reached within 6 to 12 weeks for most men, though this varies.

Will my erectile dysfunction improve after bypass surgery?

It depends. Some studies show modest improvement in erectile function following CABG as blood flow and overall fitness improve. Others show ED persisting or worsening, particularly in men with higher anxiety, depression, or longer recovery periods. Outcomes vary significantly between individuals.

Can I take Viagra after heart bypass surgery?

Generally yes, once your cardiac team has confirmed you are fit for normal physical activity including sex. The key exception is if you are taking nitrate medication for angina — PDE5 inhibitors cannot be combined with nitrates due to a dangerous blood pressure interaction. Always confirm with your cardiologist or GP first.

Why did my erectile dysfunction get worse after surgery?

Several factors can contribute, including hormonal disruption from the cardiopulmonary bypass machine during on-pump surgery, anxiety or depression related to the surgery itself, a longer or more difficult recovery, and pre-existing vascular disease that surgery addresses in the heart but not necessarily elsewhere. A proper assessment can help identify which factors are relevant to you.

Should I tell my cardiologist about erectile dysfunction?

Yes. ED is a recognised and common issue after cardiac surgery, and your cardiologist or GP needs to know both to address it directly and because erectile dysfunction itself can be a marker of how your broader cardiovascular recovery is progressing.