The mechanisms by which testosterone plays a role in erectile function are not completely understood. A study evaluating the effect of testosterone on erections in surgically castrated rabbits and control animals, in which the rabbits’ intracavernosal pressures were compared after cavernosal nerve stimulation, determined that castrated rabbits had much lower pressures after stimulation than control rabbits did.  Notably, the pressures increased when castrated rabbits received exogenous testosterone replacement.
There have been rare reports of priapism (prolonged and painful erections lasting more than six hours) with the use of PDE5 inhibitors such as sildenafil, vardenafil, and tadalafil. Patients with blood cell diseases such as sickle cell anemia, leukemia, and multiple myeloma have higher than normal risks of developing priapism. Untreated priapism can cause injury to the penis and lead to permanent impotence. Therefore, if your erection lasts four hours, you should seek emergency medical care.
Replacement testosterone is available as oral pills, intramuscular injections, skin patches, and a gel that is rubbed into the skin. Men with low sexual desire and ED may have low testosterone (male hormone) levels. Hormone replacement may occasionally be of some benefit, especially when used in combination with other therapies. Testosterone supplementation alone is not particularly effective in treating erectile dysfunction. Sexual desire and an overall sense of well-being are likely to improve when serum testosterone levels (the levels in the blood) are restored. This can take several months after starting testosterone replacement.
Surgical intervention for a number of conditions may remove anatomical structures necessary to erection, damage nerves, or impair blood supply. Erectile dysfunction is a common complication of treatments for prostate cancer, including prostatectomy and destruction of the prostate by external beam radiation, although the prostate gland itself is not necessary to achieve an erection. As far as inguinal hernia surgery is concerned, in most cases, and in the absence of postoperative complications, the operative repair can lead to a recovery of the sexual life of people with preoperative sexual dysfunction, while, in most cases, it does not affect people with a preoperative normal sexual life.
3. Are there physical causes of erectile dysfunction? Erectile dysfunction may be a symptom of underlying medical conditions, which if not detected may cause further medical problems. A prior history of cigarette smoking, heart attacks, strokes, and poor circulation in the extremities (for example, intermittent claudication or cramping in your leg[s] when you walk) suggest atherosclerosis as the cause of the erectile dysfunction. Loss of sexual desire and drive, lack of sexual fantasies, gynecomastia (enlargement of breasts), and diminished facial hair suggest low testosterone levels. A prior history of pelvic surgery or radiation and trauma to the penis/pelvis/perineum can cause problems with the nerves and blood vessels. Symptoms of intermittent claudication of the lower extremities with exercise may suggest a vascular problem as a cause of the erectile dysfunction.
Knowing about your history of ED will help your health provider learn if your problems are because of your desire for sex, erection function, ejaculation, or orgasm (climax). Some of these questions may seem private or even embarrassing. However, be assured that your doctor is a professional and your honest answers will help find the cause and best treatment for you.