In comparison, 37% of men who had received external radiotherapy as their primary therapy reported the ability to attain functional erections suitable for intercourse, along with 43% of men who had received brachytherapy as primary treatment. Pretreatment sexual health-related quality of life score, age, serum prostate-specific antigen (PSA) level, race or ethnicity, body mass index, and intended treatment details were associated with functional erections 2 years after treatment. 
In the Massachusetts Male Aging Study (MMAS) among a community-based survey of men aged 40-70 years, 52% of the men reported some degree of erectile difficulty. Complete ED, defined as the total inability to obtain or maintain suitable erections during sexual stimulation, as well as the absence of nocturnal erections (normal erections [four to six/night], which occur during sleep), occurred in 10% of the men in the study. Lesser degrees of mild and moderate ED occurred in 17% and 25% of participants.
Sildenafil has been previously suggested as a treatment option for ED in men with epilepsy (77,78). However, Matos et al. warned that PDE5i are potentially pro-convulsant and should be used with great caution in men with epilepsy (79). Animal studies in rat and mice overwhelmingly suggest PDE5i can reduce seizure threshold. In human trials, seizures were rare but reported. PDE5i exerted their proconvulsive effect by lower seizure threshold possibly by worsening sleep or obstructive sleep apnea, causing cardiovascular changes, or leading to EEG changes specifically with tadalafil use.
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. 
MalaCards based summary : Impotence, also known as erectile dysfunction, is related to vasculogenic impotence and hyperprolactinemia, and has symptoms including angina pectoris, pelvic pain and tremor. An important gene associated with Impotence is NOS1 (Nitric Oxide Synthase 1), and among its related pathways/superpathways are Response to elevated platelet cytosolic Ca2+ and Platelet homeostasis. The drugs Methyltestosterone and Testosterone have been mentioned in the context of this disorder. Affiliated tissues include prostate, spinal cord and endothelial, and related phenotypes are normal and reproductive system
Oral phosphodiesterase type 5 inhibitors (PDE5 inhibitors) unless contraindicated are the recommended first line medical therapy for erectile dysfunction. Currently, there are four different PDE5 inhibitors available. They all work the same way and have essentially the same results. They differ in how long they last in your body and in side effects.
Vascular damage may result from radiation therapy to the pelvis and prostate in the treatment of prostate cancer.  Both the blood vessels and the nerves to the penis may be affected. Radiation damage to the crura of the penis, which are highly susceptible to radiation damage, can induce ED. Data indicate that 50% of men undergoing radiation therapy lose erectile function within 5 years after completing therapy; fortunately, some respond to one of the PDE5 inhibitors.
When stimulated by the nerves, the spongy tissue arranges itself in such a way that more blood can be stored in the penis. The veins running through the outer sheath of the penis then compress which stops the blood from leaving the penis. As the blood is stopped from flowing out, the penis fills with blood and stretches within the outer casing, giving an erection.
Alprostadil may also be administered into the urethral opening of the penis. In MUSE (medical urethral system for erection), the man inserts a thin tube the width of a vermicelli noodle into his urethral opening and presses down on a plunger to deliver a tiny pellet containing alprostadil into his penis. The drug takes about 10 minutes to work and the erection lasts about an hour. The main side effect is a sensation of pain and burning in the urethra, which can last about five to 15 minutes.
Self-injection of these agents has been of enormous benefit because they represent the most effective way to achieve erections in a wide variety of men who otherwise would be unable to achieve adequate rigid erections. The need for intact nerve pathways to the penile tissue is not needed. The locally injected medication directly relaxes the arteriole vessels and penile cavernosal tissue. Thus, this therapy is not dependent on sexual stimulation.