I suffered from sporadic limp dick in my 20s. It was usually when I was nervous because I was with a girl I actually liked. A doctor prescribed me Viagra. When I took it, my whole body went bright red, my nose became so congested that I had to breath through my mouth—almost impossible to do while kissing—and I stayed hard for an uncomfortably long nine hours.
Recently, the US Food and Drug Administration (FDA) has issued a safety announcement regarding TRT. In part it reads ‘The benefit and safety of these medications have not been established. We are also requiring these manufacturers to add information to the labeling about a possible increased risk of heart attacks and strokes in patients taking testosterone.’37
If PDE5 drugs don't work or cannot be used because of potential side effects, your doctor can recommend other therapies. The drug alprostadil (Caverject, Edex, Muse) allows blood to flow more freely in the penis, leading to an erection. The drug can be injected with a tiny needle into your penis. Or, a small pellet (suppository) can be inserted into the opening of the penis. Suppositories and injections are effective in the majority of men.
Poor sleep patterns can be a contributing factor for erectile dysfunction, Mucher says. One review published in the journal Brain Research emphasized the intricate relationship between the level of sex hormones like testosterone, sexual function, and sleep, noting that testosterone levels increase with improved sleep, and lower levels are associated with sexual dysfunction. Hormone secretion is controlled by the body’s internal clock, and sleep patterns likely help the body determine when to release certain hormones.
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. 
Among the phenomena in the ageing man are a decrease in erectile function and testosterone levels. Add to these, increased risk for CVD, muscle wasting, decrease in bone density and libido, with all of these factors having an interplay with testosterone metabolism.33 Androgens play a key role in maintaining erectile function through four main mechanisms. Androgen deprivation has been shown to result in impairment of NO synthase release, altered PDE5 expression and activity, impaired cavernosal nerve function, and contribution to veno-occlusive disease in the penis.34 The role of testosterone replacement therapy (TRT) as a potential to improve erectile function in the man with ED remains an issue for patient and physicians who are comfortable treating androgen deficiency which include primary care physicians and specialists. Androgens are known to have a significant impact on the function of the smooth musculature within the corpus spongiosum.35
The symptoms of erectile dysfunction include difficulty achieving an erection, trouble maintaining an erection, and a reduced interest in sex. Because male sexual arousal is a fairly complex process, it can sometimes be difficult to identify a specific cause. Arousal starts in the brain but it also involves the nerves, muscles, and blood vessels and can be impacted by hormones and emotions. If a problem develops with any of these things, erectile dysfunction could be the consequence.
A vacuum erection device is a plastic tube that slips over the penis, making a seal with the skin of the body. A pump at the other end of the tube makes a low-pressure vacuum around the erectile tissue, which results in an erection. An elastic ring is then slipped onto the base of the penis. This holds the blood in the penis (and keeps it hard) for up to 30 minutes. With proper training, 75 out of 100 men can get a working erection using a vacuum erection device.