Common medical conditions such as diabetes, heart disease, and high blood pressure are associated with an increased risk of developing erectile dysfunction. Thus, optimal management of these diseases may help prevent the development or progression of erectile dysfunction. Lifestyle modifications to improve vascular function, including smoking cessation, losing weight if overweight, and exercising regularly, may be helpful.
The truth is medication or psychosexual counselling are the first treatments a doctor will suggest because they’ve been proven to work. If a doctor has approved a medication for you then it’s safe. If you would still like to see if herbal supplements work for you, then there is a list below of supplements thought to work for erectile dysfunction. Just before you invest your money in them, remember they aren’t proven to work:
Using a tiny needle and syringe, the man injects a small amount of medicine into the side of his penis. The medicine relaxes the blood vessels, allowing blood to flow into the penis. This treatment has been widely used and accepted since the early 1980s. The three most common medicines are prostaglandin E1 (alprostadil), papaverine (Papacon®), and phentolamine (Regitine®).
Penile Injection Medication: This is just what it sounds like. Injected at home directly into the penis, the medication alprostadil produces erection by relaxing certain muscles, increasing blood flow into the penis and restricting outflow. Although some sources report an 80 percent success rate, the therapy has disadvantages, such as risks of infection, pain, and scarring—fibrosis—in the penis, and it may also cause priapism. A popular version of this medication is Upjohn Corporation’s Caverject. The MUSE System, by VIVUS, involves the same medicine (a pellet of alprostadil) applied with an eye-dropper-like applicator, directly into the urethra.
Experts often treat psychologically based impotence using techniques that decrease anxiety associated with intercourse. The patient's partner can help apply the techniques, which include gradual development of intimacy and stimulation. Such techniques also can help relieve anxiety during treatment of physical impotence. If these simple behavioral methods at home are ineffective, a doctor may refer an individual to a sex counselor.
The primary nerve fibers to the penis are from the dorsal nerve of the penis, a branch of the pudendal nerve. The cavernosal nerves are a part of the autonomic nervous system and incorporate both sympathetic and parasympathetic fibers. They travel posterolaterally along the prostate and enter the corpora cavernosa and corpus spongiosum to regulate blood flow during erection and detumescence. The dorsal somatic nerves are also branches of the pudendal nerves. They are primarily responsible for penile sensation. 
The vascular processes that produce an erection are controlled by the nervous system and certain prescription medications may have the side effect of interfering with necessary nerve signals. Among the possible culprits are a variety of stimulants, sedatives, diuretics, antihistamines, and drugs to treat high blood pressure, cancer, or depression. But never stop a medication unless your doctor tells you to. In addition, alcohol, tobacco, and illegal drugs, such as marijuana, may contribute to the dysfunction.
These oral medications reversibly inhibit penile-specific PDE5 and enhance the nitric oxide–cGMP pathways of cavernous smooth muscle relaxation; that is, all prevent the breakdown of cGMP by PDE5. It is important to emphasize to patients that these drugs augment the body’s natural erectile mechanisms, therefore the neural and psychoemotional stimuli typically needed for arousal still need to be activated for the drugs to be efficacious.
It appears that testosterone has NOS-independent pathways as well. In one study, castrated rats were implanted with testosterone pellets and then divided into a group that received an NOS inhibitor (L-nitro-L-arginine methyl ester [L-NAME]) and a control group that received no enzyme.  The castrated rats that were given testosterone pellets and L-NAME still had partial erections, a result suggesting the presence of a pathway independent of NOS activity.
The association between low testosterone and ED is not entirely clear. Although these 2 processes certainly overlap in some instances, they are distinct entities. Some 2-21% of men have both hypogonadism and ED; however, it is unclear to what degree treating the former will improve erectile function.  About 35-40% of men with low testosterone see an improvement in their erections with testosterone replacement; however, almost 65% of these men see no improvement. 
Monitoring erections that occur during sleep (nocturnal penile tumescence) can help you and your doctor to understand if the erectile dysfunction is due to psychological or physical causes. The nocturnal penile tumescence test is a study to evaluate erections at night. Normally men have three to five erections per eight hours of sleep. The test can be performed at home or in a sleep lab. The most accurate way to perform the test involves a special device that is connected to two rings. The rings are placed around the penis, one at the tip of the penis and the other at the bottom (base) of the penis. The device records how many erections occur, how long they last, and how rigid they are. The test is limited in that it does not assess the ability to penetrate.
These are not currently approved by the FDA for ED management, but they may be offered through research studies (clinical trials). Patients who are interested should discuss the risks and benefits (informed consent) of each, as well as costs before starting any clinical trials. Most therapies not approved by the FDA are not covered by government or private insurance benefits.