Poor sleep patterns can be a contributing factor for erectile dysfunction, Mucher says. One review published in the journal Brain Research emphasized the intricate relationship between the level of sex hormones like testosterone, sexual function, and sleep, noting that testosterone levels increase with improved sleep, and lower levels are associated with sexual dysfunction. Hormone secretion is controlled by the body’s internal clock, and sleep patterns likely help the body determine when to release certain hormones.
Chronic stress dumps adrenaline in your system multiple times a day. And that can lead to high blood pressure, heart disease, obesity, and diabetes. Chronic stress is like red-lining your car all day long. When you drive 100 mph all the time, something is going to break down. A high-stress environment can actually change the way your brain sends messages to your body. Dumping too much adrenaline into your bloodstream can affect blood flow and severely limit your ability to achieve and maintain an erection.
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.
The vacuum device creates a vacuum to pull blood into the penis. Unlike a normal erection, the inflow of blood does not continue once the individual removes the vacuum device. The rubber band placed at the base of the penis constricts the penis to prevent the blood from leaving the penis. As there is no inflow or outflow of blood when the rubber band is in place, it is uncommon for the tip of the penis (the glans) to appear a little blue and the penis to be cooler. Once intercourse is completed, the individual removes the rubber band and the blood drains out of the penis.
The risk of impotence increases with age. It is four-fold higher in men in their 60s compared with those in their 40s according to a study published in the Journal of Urology (2000;163:460-463). Men with less education are also more likely to experience impotence, perhaps because they tend to have less healthy lifestyles, eat a less healthy diet, drink more and exercise less. Physical exercise tends to lessen the risk of impotence.
The health care provider will ask about the firmness and duration of erections at different times (e.g., sex with partners, erections after sleep). Discussing sexual dysfunction with a health care provider is very important because many conditions causing it can be successfully treated. If a man has no diseases that cause ED and can have an erection with masturbation or early morning awakening, he likely has ED due to psychological causes.
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.
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. 
You should talk to your doctor about possible treatments. You may want to talk to other patients who have had the treatment planned for you. You also may want to seek a second doctor's opinion about surgery before making your decision. You may find it difficult to talk to your doctor about impotence. You will want to find a doctor who treats this condition and will help you feel comfortable talking about the problem and choosing the best treatment. You can also get more information by contacting your local National Kidney Foundation affiliate.
Erection is a vascular event. The penis becomes rigid when blood flow to the corpora cavernosa increases sixfold and venous outflow is physiologically impeded. Penile perfusion is governed by three organ systems—the neurologic, circulatory, and endocrinologic systems—each necessary for potency. The neurologic system accounts for vasodilation and venoconstriction of the corporal blood vessels so that blood is shunted to the erectile tissues; the circulatory system provides adequate blood flow to the hypogastric-cavernous bed, a distal branch off the internal iliac vessels; and the endocrine system, mediated by testosterone, plays a permissive role through mechanisms that have yet to be elucidated.
In addition, a man affected by lower testosterone may feel less sexually inclined, less interested in viewing sexual material, and less interested in physical activities. To add to this, a man dealing with less testosterone may also become less assertive, more inclined to stay in, and more likely to seek out medical help for his erectile dysfunction.
Thanks to over a decade of primetime television commercials, most of us can name at least one drug that treats erectile problems. However, far fewer of us can name drugs that may actually cause the problem. In reality, MedlinePlus reported that there are far more of these, and even common drugs such those to treat depression and heartburn can make it difficult to get an erection.
The severity of ED has been correlated with the extent of CVD. Banks et al reported that the risk of future CV events increased progressively according to ED severity.28 This was shown in both men with and without known CVD at baseline and after controlling for confounders. Solomon and colleagues found an inverse correlation between international index of erectile function (IIEF) scores and plaque burden seen on coronary angiography.29 In addition, Yaman et al demonstrated a significant correlation between ED severity on IIEF questionnaires and coronary artery calcification.30
Having erection trouble from time to time isn't necessarily a cause for concern. If erectile dysfunction is an ongoing issue, however, it can cause stress, affect your self-confidence and contribute to relationship problems. Problems getting or keeping an erection can also be a sign of an underlying health condition that needs treatment and a risk factor for heart disease.