The effect of sexual intercourse on the cardiovascular system is very similar to the effect of moderate exercise. (It is roughly equivalent to walking 2 - 4 miles per hour on a level surface.) So it should not be surprising that, like exercise, sexual activity can transiently increase the risk in a person with coronary artery disease (CAD).
But also like exercise, with appropriate precautions sexual activity after a heart attack is something that is usually quite safe, and (because it contributes to well-being, solidifies the bond between you and your partner, and helps to prevent depression), ought to be encouraged.
In general, doctors ask their patients to avoid sexual intercourse for 4 - 6 weeks after a heart attack, while the heart is healing. Ideally, you will be participating in a cardiac rehabilitation program during that period of time, so that when you are ready to resume sexual activity, your cardiovascular system will be quite used to that amount of exertion - and you will be practicing "safe sex."
Certain individuals after a heart attack - those who have developed heart failure, who have blood pressure problems, who are having continued angina, or who have other complications - may need to avoid sexual activity for longer periods of time, while their medical problems are being fully stabilized.
It is common for men to suffer some degree of erectile dysfunction after a heart attack, and for both men and women to experience a decrease in the desire for sex. Some of these problems may be due to medications you may be taking, but more often they are due to anxiety, depression, or fears about having another heart attack during sex. Such psychological issues most commonly resolve on their own after a month or two, as you regain confidence in your abilities to function normally in all the other aspects of your life - but if they persist, it will be useful to discuss them with your doctor, as they can almost always be treated effectively.
In men, medications for erectile dysfunction - such as Viagra (sildenafil), Cialis (tadalafil) and Levitra (vardenafil) - are very effective. These medications can be used safely in most men with CAD, with one important exception: If you are taking nitrates for angina, then taking any of these medications for erectile dysfunction can produce a dangerous drop in blood pressure, and they simply cannot be used. Similarly, if you are taking Viagra, Cialis or Levitra and you should experience an episode of chest pain - do not take nitrates for the pain. Rather, stop all activity, rest, and wait 10 minutes - if the chest pain is not gone after 10 minutes, call 911.
The bottom line is that in general, normal sexual activity can be resumed within a few weeks of a heart attack. But to repeat, because there are important individual considerations to be made, you should discuss your specific case with your own doctor.
Rosal, MC, Downing, J, Littman, AB, Ahern, DK. Sexual functioning post-myocardial infarction: effects of beta-blockers, psychological status and safety information. J Psychosom Res 1994; 38:655.
DeBusk, RF. Evaluating the cardiovascular tolerance for sex. Am J Cardiol 2000; 86:51F.