Psychological factors — Psychological issues such as depression, anxiety, guilt or fear can sometimes cause sexual problems. At one time, these factors were thought to be the major cause of impotence. Doctors now know that physical factors cause impotence in most men with the problem. However, embarrassment or "performance anxiety" can make a physical problem worse.
A common and important cause of ED is vasculogenic. Many men with ED have comorbid conditions such as hyperlipidemia, hypercholesterolemia, tobacco abuse, diabetes mellitus, or coronary artery disease (CAD).  The Princeton III Consensus recommends screening men who present with ED for cardiovascular risk factors; ED may be the earliest presentation of atherosclerosis and vascular disease. 
Treatment. prostatitis or another acute infection affecting the genitalia can cause temporary impotence that clears up in response to antibiotics. The smooth muscle relaxant sildenafil (viagra) was introduced in 1998 as a treatment for organic impotence. Administration of testosterone may be indicated if low levels of this hormone are found in a blood sample. If impotence is organic and does not respond to other therapies, a penile prosthesis can be implanted; this is usually done surgically by a urologist. Other therapies include the use of vacuum tumescence devices and penile injection of pharmacologic agents that cause dilation.
As is true in so many medical conditions, lifestyle modifications, considered first-line therapy, can have a salutary effect in ED management, and men should be encouraged to make the necessary changes to the benefit of their sexual function and to their overall health as well. Despite the benefits of behaviour modification, men presenting with ED want the physician to help with measures that can have an immediate impact.
In order to establish whether normal erections are occurring overnight (nocturnal erections), the doctor may organise nocturnal penile tumescence (NPT) testing. This involves wearing a monitor overnight in your own home. The data from this monitor is then assessed to analyse how often erections occurred, how long they lasted, and how rigid and large the penis was during the erections. If NPT testing is normal, the cause of erectile dysfunction is usually psychological. If not, further testing of the blood flow in the genital area may be required to see if there is blockage or leakage. The doctor may also organise a blood test of levels of hormones such as testosterone, prolactin and thyroid stimulating hormone to see if these are contributing to the erectile dysfunction.
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 recommended starting dose of vardenafil is 10 mg taken orally approximately one hour before sexual activity. A doctor may adjust the dose higher or lower depending on efficacy and side effects. The maximum recommended dose is 20 mg, and the maximum recommended dosing frequency is no more than once per day. Patients can take vardenafil with or without food. As with sildenafil, for vardenafil to be effective, sexual stimulation must occur.
The dose of PDE5 inhibitor that you start with may vary with underlying medical conditions and medications that you are taking. Thus, it is important to review all medications (even over the counter medications) with your physician. Typically, one starts with a lower dose and increases as needed. Some medical conditions prevent going up to higher doses. You can review the drug prescribing information or consult with your doctor regarding the dose(s) that are appropriate for you.
If you bike a lot and have a very narrow saddle on your bicycle, consider switching to a "no-nose seat" which is wider at the back than a conventional saddle, allowing more of your weight to be distributed to the sitting bones. Make sure the seat is level or angled slightly downward and at a height that allows your knee to be just slightly bent at the bottom of the pedal cycle. Raising the handlebars on your bike so that you're sitting upright may also help.
Adverse effects related to PDE5i use with mild-moderate and transient (58). Furthermore, side effects usually attenuate if use is not discontinued. Autonomic dysreflexia, a life-threatening phenomenon characterized by bradycardia, hypertension, facial flushing and headaches associated with SCI lesions above T6, has not been reported with use. However, hypotension leading to dizziness in individuals treated with sildenafil has been noted with high thoracic and cervical levels of injury (72). No adverse events were noted within the study; however, the dizziness was reported by use of sildenafil 50 mg in the cervical LOI and 100 mg in the thoracic LOI patients. Headache is the most reported side effect of all PDE5i, followed by dyspepsia and flushing. Priapism, and death have not been reported after use of PDE5i by SCI patients.
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. 
When sexually stimulated there is a release of a chemical, nitric oxide (NO) in the blood vessels of the corpus cavernosum. The NO stimulates the production of a compound called cGMP, which causes relaxation of the smooth muscle in the blood vessels supplying the corpus cavernosum. PDE 5 is an enzyme that breaks down cGMP. By inhibiting the breakdown of cGMP by PDE5, these medications allow cGMP to build up in the penis. cGMP causes muscles in the corpora cavernosa of the penis to relax. When the muscle is relaxed, more blood can flow into the penis and fill the spaces in the penis. As the penis fills with blood, the veins in the penis are compressed, and this results a hard erection. When the effect on PDE5 decreases, the cGMP levels go down and the muscle in the penis contracts, causing less blood to flow into the penis and allowing the veins to open up and drain blood out of the penis.
These devices are generally safe, but bruising can occur. Other unwanted effects include pain, lower penile temperature, numbness, no or painful ejaculation, blood in the ejaculate or urine, and pulling of scrotal tissue into the cylinder. Partners may complain about the bluish discoloration and coolness of the penis. Many of these problems can be helped by proper selection of the tension rings and cylinder, use of adequate lubrication, and proper technique.
Diabetes mellitus: Erectile dysfunction tends to develop 10 to 15 years earlier in diabetic men than among nondiabetic men. The increased risk of erectile dysfunction among men with diabetes mellitus may be due to the earlier onset and greater severity of atherosclerosis (hardening of the arteries) that narrows the arteries and thereby reduces the delivery of blood to the penis. Atherosclerosis can affect the arteries in the penis, as well as the arteries in the pelvis that supply the penile arteries. Diabetes mellitus also causes erectile dysfunction by damaging nerves that go to the penis, much like the effect of diabetes on nerves in other areas of the body (diabetic neuropathy). Diabetes can also affect the muscles in the penis, leading to troubles with erections. Smoking cigarettes, obesity, poor control of blood glucose levels, and having diabetes mellitus for a long time further increase the risk of erectile dysfunction in people with diabetes.
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.