Both ED and low testosterone (hypogonadism) increase with age. The incidence of the latter is 40% in men aged 45 years and older.  Testosterone is known to be important in mood, cognition, vitality, bone health, and muscle and fat composition. It also plays a key role in sexual dysfunction (eg, low libido, poor erection quality, ejaculatory or orgasmic dysfunction, reduced spontaneous erections, or reduced sexual activity). 
In some cases, nocturnal penile tumescence testing is performed to find out whether the man has erections while asleep. Healthy men usually have about four or five erections throughout the night. The man applies a device to the penis called a Rigiscan before going to bed at night, and the device can determine whether he has had erections. (If a man is able to have normal erections at night, this suggests a psychological cause for his impotence.)
Impotence, also called erectile dysfunction, in general, the inability of a man to achieve or maintain penile erection and hence the inability to participate fully in sexual intercourse. In its broadest sense the term impotence refers to the inability to become sexually aroused; in this sense it can apply to women as well as to men. In common practice, however, the term has traditionally been used to describe only male sexual dysfunctions. Professional sex therapists, while they identify two distinct dysfunctions as forms of impotence, prefer not to use the term impotence per se. Thus, because of its pejorative connotation in lay usage and because of confusion about its definition, the word impotence has been eliminated from the technical vocabulary in favour of the term “erectile dysfunction.”
Herbal supplements such as ginkgo biloba, saw palmetto, and yohimbe have been touted as sexual enhancers, and some men have been tempted to try them to treat erectile dysfunction. Bennett warns, however, that none has been approved by the FDA or even shown by any reliable studies to prevent, treat, or improve erectile dysfunction. Moreover, supplements are unregulated and can have many side effects or interfere with prescribed medications you’re already taking. Don’t jeopardize your health by taking a supplement to treat erectile dysfunction without first talking with your doctor.
If you have unstable heart disease of any kind, heart failure or unstable, what we call angina, contraindication to using the medications. All right? So if you’re in an unstable medical state, these medications are not a good idea. Now, there are relative issues. If you may be taking a blood pressure medicine or a medicine for your prostate which dilates your blood vessel a little bit– you know, the typical ones are what we call the alpha blockers– you may have an additive effect from the medication. But for the most part, the medicines are incredibly safe.
This penile tumescence monitor is placed at the base and near the corona of the penis. It is connected to a monitor that records a continuous graph depicting the force and duration of erections that occur during sleep. The monitor is strapped to the leg. The nocturnal penile tumescence test is conducted on several nights to obtain an accurate indication of erections that normally occur during the alpha phase of sleep.
The PDE5 inhibitors sildenafil (Viagra), vardenafil (Levitra) and tadalafil (Cialis) are prescription drugs which are taken orally.:20–21 Additionally, a cream combining alprostadil with the permeation enhancer DDAIP has been approved in Canada as a first line treatment for erectile dysfunction. Penile injections, on the other hand, can involve one of the following medications: papaverine, phentolamine, and prostaglandin E1, also known as alprostadil.:25
Fortunately, impotence is usually treatable. A thorough evaluation starting with a history and physical exam is needed to help diagnose the underlying cause. Once the cause of impotence is determined, treatment can be tailored to target that cause and any other contributing factors. Treatments used for impotence may include medications, vacuum devices, surgery, and psychotherapy.