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. 
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. 
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.
One study examined the role of testosterone supplementation in hypogonadal men with ED. These men were considered nonresponders to sildenafil, and their erections were monitored by assessing nocturnal penile tumescence (NPT). After these men were given testosterone transdermally for 6 months, the number of NPTs increased, as did the maximum rigidity with sildenafil.  This study suggests that a certain level of testosterone may be necessary for PDE5 inhibitors to function properly.
The normal development of the prostate gland is dependent on the action of testosterone via the androgen receptor, and abnormal biosynthesis of the hormone or inactivating mutations of the androgen receptor are associated with a rudimentary prostate gland. Testosterone also requires conversion to dihydrotestosterone in the prostate gland for full activity. In view of this link between testosterone and prostate development, it is important to consider the impact that testosterone replacement may have on the prevalence and morbidity associated with benign prostatic hypertrophy (BPH) and prostate cancer, which are the common conditions related to pathological growth of the prostate gland.
It may also become a treatment for anemia, bone density and strength problems. In a 2017 study published in the journal of the American Medical Association (JAMA), testosterone treatments corrected anemia in older men with low testosterone levels better than a placebo. Another 2017 study published in JAMA found that older men with low testosterone had increased bone strength and density after treatment when compared with a placebo.
Studies conducted in rats have indicated that their degree of sexual arousal is sensitive to reductions in testosterone. When testosterone-deprived rats were given medium levels of testosterone, their sexual behaviors (copulation, partner preference, etc.) resumed, but not when given low amounts of the same hormone. Therefore, these mammals may provide a model for studying clinical populations among humans suffering from sexual arousal deficits such as hypoactive sexual desire disorder.
Hypogonadism is a disease in which the body is unable to produce normal amounts of testosterone due to a problem with the testicles or with the pituitary gland that controls the testicles. Testosterone replacement therapy can improve the signs and symptoms of low testosterone in these men. Doctors may prescribe testosterone as injections, pellets, patches or gels.