Erectile dysfunction can occur as a side effect of medication taken for another health condition. Common culprits are high blood pressure meds, antidepressants, some diuretics, beta-blockers, heart medication, cholesterol meds, antipsychotic drugs, hormone drugs, corticosteroids, chemotherapy, and medication for male pattern baldness, among others.
Once a complete sexual and medical history has been completed, appropriate laboratory studies should be conducted. In the initial evaluation of ED, sophisticated laboratory testing is rarely necessary. For example, serum testosterone (and sometimes prolactin) is typically only useful when the patient demonstrates hypogonadal features or testicular atrophy, or when clinical history is suggestive. Additional hormonal evaluation may include thyroid stimulating hormone in those with a clinical suspicion of hypothyroidism or appropriate diabetes screening in those presenting with a concern for impaired glucose metabolism. If the patient has not been evaluated with a lipid panel and hyperlipidemia is suspected, measurement and appropriate referral to internal medicine or cardiology is recommended. In most cases, a tentative diagnosis can be established with a complete sexual and medical history, physical examination, and limited or no laboratory testing.
In a 2005 study, three months of twice-daily sets of kegel exercises combined with biofeedback and advice on lifestyle changes, such as quitting smoking, losing weight, and limiting alcohol, worked far better than just giving the participants advice. “Wearing tight pants will affect impotence along with some other medical conditions like diabetes and heart disease,” which can also affect a man’s degree of impotence, Dr. Jennifer Burns, specializing in family practice with an emphasis on gastrointestinal health at the BienEtre Center, told Medical Daily.
The dorsal artery provides for engorgement of the glans during erection, whereas the bulbourethral artery supplies the bulb and the corpus spongiosum. The cavernous artery effects tumescence of the corpus cavernosum and thus is principally responsible for erection. The cavernous artery gives off many helicine arteries, which supply the trabecular erectile tissue and the sinusoids. These helicine arteries are contracted and tortuous in the flaccid state and become dilated and straight during erection. 
According to a review of all randomized controlled trials evaluating sildenafil by the American Urological Association (AUA) Consensus Panel on Erectile Dysfunction, 36% to 76% of patients receiving the drug were "able to achieve intercourse" during treatment. For tadalafil, four randomized controlled trials revealed that 11% to 47% of patients were "able to achieve intercourse." Similar efficacy has been observed with vardenafil, although studies are fewer.19 A meta-analysis published in 2013 clearly demonstrated increased efficacy over placebo for all PDE5 inhibitors.24 Head-to-head comparison suggested that tadalafil outperforms sildenafil on validated measures of erectile dysfunction, including the international index of erectile function and sexual encounter profile-2 and -3.
The success of treatment for sexual dysfunction depends on the underlying cause of the problem. The outlook is good for dysfunction that is related to a condition that can be treated or reversed. Mild dysfunction that is related to stress, fear, or anxiety often can be successfully treated with counseling, education, and improved communication between partners.
Research has even found possible links to frequent ejaculation and a lower risk of prostate cancer. In one study of 32,000 men published in 2016 in the journal European Urology, for example, men who ejaculated at least 21 times per month while in their 20s were less likely to be diagnosed with prostate cancer than those who ejaculated four to seven times per month. And men who ejaculated more often in their 40s were 22 percent less likely to get a prostate cancer diagnosis.
MSA is a neurodegenerative disease of undetermined etiology, where ED is an early prominent sign occurring in 40% of men at the time of diagnosis (46,47). ED occurs in the majority of patients and the exact cause of it is unknown (48). Like PD, MSA likely affects the dopaminergic pathways within the brain essential for arousal (49). Orthostatic hypotension (OH) as a causal factor has been refuted by evidence that sildenafil can overcome reduced filling pressures, and the ED usually precedes the development of OH (46,49,50). Similar to other neurologic disorders that lead to ED, other disease related factors such as psychosocial stress, the burden of chronic illness, changed appearance, fatigue, decreased fine motor movement of fingers, immobility and diminished self-esteem due to loss of independence may contribute as well (51).
ICI therapy often produces a reliable erection, which comes down after 20-30 minutes or with climax. Since the ICI erection is not regulated by your penile nerves, you should not be surprised if the erection lasts after orgasm. The most common side effect of ICI therapy is a prolonged erection. Prolonged erections (>1 hour) can be reversed by a second injection (antidote) in the office.