Hello.
I can't give you a definitive answer to your questions. For that, you'll need to see a urologist for an exam to determine whether your heart disease is interfering with erections.
I can, however, give you some general information. Most anti-hypertensive drugs are associated with some interference of
sexualCauses of sexual dysfunction
Erection problems
Female sexual dysfunction
Sexual problems overview response. Ask your physician if there is another medication you can take which has less
sexualCauses of sexual dysfunction
Erection problems
Female sexual dysfunction
Sexual problems overview side effects.
The fact that you sometimes have erections MAY be related to your heart disease, or the drugs, or a combination of both. Or it may also be related to anxiety and stress--about your life, your relationships, or your sexuality. Once you begin worrying about erections, it becomes a self-fulfilling prophesy: the more you worry, the more your penis won't cooperate.
Worrying about erections is a dead-end street. Relax, find out more about the drugs you're taking, and enjoy your sexuality without putting any expectations of "performance" on yourself. Best of luck to you. Dr. J