While many drugs used to treat high blood pressure have been linked to erectile dysfunction, some are much less likely than others to cause problems. Certain high blood pressure drugs may even improve erectile dysfunction for some men.
It's known that diuretics (or water pills, like hydrochlorothiazide) and beta-blockers (like Atenolol) can also cause erection problems. These are also the first drugs that a doctor is likely to prescribe if you are not able to lower your high blood pressure through diet and exercise.
If you take a diuretic, you should stay on it until high blood pressure is under control. If erection problems persist, or blood pressure goes back up, then your doctor might switch to a drug that's less likely to cause erectile dysfunction. Or, a combination of medications might work better to control high blood pressure and lower the risk of erectile dysfunction.
ACE (angiotensin converting enzyme) inhibitors -- such as Capoten, Lotensin, Prinivil, and Zestril for example -- widen blood vessels and increase blood flow. Erectile dysfunction is rarely a side effect, occurring in less than 1% of patients. There are several different drugs in this category. This seems to be true of all of them.