Exercise and lifestyle modifications may improve erectile function. Weight loss may help by decreasing inflammation, increasing testosterone, and improving self-esteem. Patients should be educated to increase activity, reduce weight, and stop smoking, as these efforts can improve or restore erectile function in men without comorbidities. Precise glycemic control in diabetic patients and pharmacologic treatment of hypertension may be important in preventing or reducing sexual dysfunction. 
ED can also occur among younger men. A 2013 study found that one in four men seeking their first treatment for ED were under the age of 40. The researchers found a stronger correlation between smoking and illicit drug use and ED in men under 40 than among older men. That suggests that lifestyle choices may be a main contributing factor for ED in younger men.
Then you have to be able to make the right diagnosis. What is the basis for their erectile dysfunction? Is it psychogenic? Is it some sort of neurological or blood vessel or hormonal issue? So you have to make a diagnosis. You have to be able to make an assessment. And then only after those things are done, then you start to think about medications.
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.
Dr. Ronald Swerdloff, chief of the endocrinology division at the Harbor-UCLA Medical Center and a professor of medicine at UCLA's David Geffen School of Medicine, served on the panel of experts who developed the Endocrine Society's guidelines. He is also the principal investigator for one of the 12 sites of The Testosterone Trial in Older Men, a nationwide study funded mainly by the National Institute on Aging. The study of 800 men over age 65 with low testosterone is looking at whether men using AndroGel for one year, compared to placebo, will show improvements in walking speed, sexual activity, vitality, memory, and anemia. The study will be completed in June 2015.
Penile erection is managed by two mechanisms: the reflex erection, which is achieved by directly touching the penile shaft, and the psychogenic erection, which is achieved by erotic or emotional stimuli. The former uses the peripheral nerves and the lower parts of the spinal cord, whereas the latter uses the limbic system of the brain. In both cases, an intact neural system is required for a successful and complete erection. Stimulation of the penile shaft by the nervous system leads to the secretion of nitric oxide (NO), which causes the relaxation of smooth muscles of corpora cavernosa (the main erectile tissue of penis), and subsequently penile erection. Additionally, adequate levels of testosterone (produced by the testes) and an intact pituitary gland are required for the development of a healthy erectile system. As can be understood from the mechanisms of a normal erection, impotence may develop due to hormonal deficiency, disorders of the neural system, lack of adequate penile blood supply or psychological problems. Spinal cord injury causes sexual dysfunction including ED. Restriction of blood flow can arise from impaired endothelial function due to the usual causes associated with coronary artery disease, but can also be caused by prolonged exposure to bright light.
Alteration of NO levels is the focus of several approaches to the treatment of ED. Inhibitors of phosphodiesterase, which primarily hydrolyze cGMP type 5, provided the basis for the development of the PDE5 inhibitors. Chen et al administered oral L-arginine and reported subjective improvement in 50 men with ED.  These supplements are readily available commercially. Reported adverse effects include nausea, diarrhea, headache, flushing, numbness, and hypotension.
Oral/buccal (by mouth). The buccal dose comes in a patch that you place above your incisor (canine or "eyetooth"). The medication looks like a tablet but you should not chew or swallow it. The drug is released over 12 hours. This method has fewer harmful side effects on the liver than if the drug is swallowed, but it may cause headaches or cause irritation where you place it.
Lifestyle choices that impair blood circulation can contribute to ED. Smoking, excessive drinking, and drug abuse may damage the blood vessels and reduce blood flow to the penis. Smoking makes men with atherosclerosis particularly vulnerable to ED. Being overweight and getting too little exercise also contribute to ED. Studies indicate that men who exercise regularly have a lower risk of ED.
With an inflatable implant, fluid-filled cylinders are placed lengthwise in the penis. Tubing joins these cylinders to a pump placed inside the scrotum (between the testicles). When the pump is engaged, pressure in the cylinders inflate the penis and makes it stiff. Inflatable implants make a normal looking erection and are natural feeling for your partner. Your surgeon may suggest a lubricant for your partner. With the implant, men can control firmness and, sometimes, the size of the erection. Implants allows a couple to be spontaneously intimate. There is generally no change to a man's feeling or orgasm.