If the inability to get or maintain an erection happens to you once or twice, you may not need to see a doctor. Many lifestyle factors, such as stress or drinking too much alcohol, can affect your sexual ability. If you notice the problem is happening on a routine basis and it’s impacting your ability to have a satisfying sex life, then it’s time to consider seeing a doctor.
Erectile dysfunction is a common problem for more than half of men with diabetes. Musicki says that an estimated "50 percent to 75 percent of diabetic men have erectile dysfunction to some degree, [a rate] about threefold higher than in non-diabetic men."  This is not the same type of erectile dysfunction seen in non-diabetics, and it is less effectively treated with conventional drugs like Viagra. 
At the same time, people with diabetes are susceptible to a type of blood vessel damage known as endothelial dysfunction. A recent study found that men with ED are at a greater risk of heart disease, which is also associated with endothelial dysfunction. If blood vessels aren't in good working order, the penis may not get enough blood for an erection.
Peyronie's disease is a condition associated with ED. Peyronie's disease is thought to result from minor repetitive trauma to the penis that leads to scarring of the tunica albuginea. It is often associated with a palpable scar in the penis, plaque. The scarring can cause the penis to curve in the direction of the scar, along with painful erections and erectile dysfunction. Some treatments for Peyronie's disease (excision of the plaque and placement of new tissue in its place, grafting) may cause ED also.
You’ve probably heard of Viagra, but it’s not the only pill for ED. This class of drugs also includes Cialis, Levitra,  Staxyn, and Stendra. All work by improving blood flow to the penis during arousal. They're generally taken 30-60 minutes before sexual activity and should not be used more than once a day. Cialis can be taken up to 36 hours before sexual activity and also comes in a lower, daily dose. Staxyn dissolves in the mouth. All require an OK from your doctor first for safety.
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. 

The key to treating erectile dysfunction is to identify the underlying cause. In many cases, it takes a fair bit of trial and error. Because the majority of ED cases are caused by physiological issues, your first step should be to talk to your doctor about your concerns. After completing a physical examination and reviewing your medical history, your doctor will ask you some questions and run some tests to rule out medical causes for your ED.

For oral erectile dysfunction medicines to work as desired, they must be used properly in the first place. This means taking the medicine 30–45 minutes before engaging in sexual intimacy; taking the drug on an empty stomach or at least avoiding a heavy or high-fat meal before taking the drug (this is especially important when using sildenafil); and engaging in adequate genital stimulation before attempting intercourse. Drinking small amounts of alcohol (one to two drinks) should not compromise the effectiveness of erectile dysfunction medicines, but larger amounts of alcohol can diminish a man’s ability to have an erection.
Booze. Most men have learned: One too many cocktails doesn’t improve performance; instead, it can have the opposite effect. During a recent study of 1,506 Chinese males, the men who drank three or more drinks a week were more likely to have ED or some form of sexual dysfunction. “Men may find that alcohol decreases social inhibition, which makes it easier to approach a woman,” says Montague. “But alcohol is a depressant, and at higher quantities it can reduce both a man’s desire and ability to perform.”
Fully restoring sexual health with treatment of a medical condition (such as high blood pressure with diet and/or exercise or by controlling diabetes or other chronic diseases) may not be possible. Identification and treatment of these conditions may prevent the progression of ED and affect the success of various ED therapies. Nutritional states, including malnutrition, obesity, and zinc deficiency, may be associated with erectile dysfunction, and dietary changes may prove a sufficient treatment. Masturbation and excessive masturbation are not felt to cause ED, however, if one notes weak erections with masturbation, this may be a sign of ED. Some men who masturbate frequently may have troubles with achieving the same degree of stimulation from their partner, but this is not ED.

Association between severity of erectile dysfunction and SIEDY Scale 1, Scale 2 and Scale 3 (organic, relational and intrapsychic pathogenetic components of erectile dysfunction, respectively). Data are derived from a population of 1,873 men aged 18–44 years, representing the first tertile of age in a population of patients consulting the Sexual Medicine and Andrology Unit of the University of Florence for erectile dysfunction. Data are adjusted for age, smoking habits, alcohol intake and education. Erectile dysfunction is defined according to a previously validated definition (21) using the sum of the scores obtained from question 1A (Do you have full erection sufficient for penetration? Rating 0= always, 1= often, 2= quite often and 3= sometimes) and question 2 (Does it occur to have a normal erection which you are not able to maintain? Rating 0= sometimes, 1= quite often, 2= often, and 3= always) of SIEDY, which reproduce the definition of erectile dysfunction as “The persistent inability to achieve and/or maintain an erection adequate for satisfactory sexual activity” (1). SIEDY, Structured Interview on Erectile Dysfunction.
Nerve or spinal cord damage: Damage to the spinal cord and nerves in the pelvis can cause erectile dysfunction. Nerve damage can be due to disease, trauma, or surgical procedures. Examples include injury to the spinal cord from automobile accidents, injury to the pelvic nerves from prostate surgery for cancer (prostatectomy), and some surgeries for colorectal cancer, radiation to the prostate, surgery for benign prostatic enlargement, multiple sclerosis (a neurological disease with the potential to cause widespread damage to nerves), and long-term diabetes mellitus.
Erectile Dysfunction is typically caused by a problem with blood flow in the penis due to the hardening and narrowing of the blood vessels of the penis. This occurs most commonly due to aging itself, which causes the smooth muscle cells that line the blood vessels to become stiffer and less able to stretch. This prevents the flow of blood that the penis requires to become erect.
Psychological Causes of ED – Between 10% and 20% of ED cases have a psychological cause. Because arousal starts in the brain, psychological issues can be a significant contributing factor to erectile dysfunction. Mental health conditions like depression or anxiety can negatively impact your libido, making it more difficult for you to become aroused.
Though stress and anxiety are two different things, they are closely related when it comes to issues of erectile dysfunction. In many cases, stress is the underlying factor, but it causes anxiety which then triggers more stress – it is a vicious cycle. If you take a look at the physical side of things, however, you’ll see that stress and anxiety are even more closely related than you may realize.

As blood flows into the penis, the corpora cavernosa swell, and this swelling compresses the veins (blood vessels that drain the blood out of the penis) against the tunica albuginea. Compression of the veins prevents blood from leaving the penis. This creates a hard erection. When the amount of cGMP decreases by the action of a chemical called phosphodiesterase type 5 (PDE5), the muscles in the penis tighten, and the blood flow into the penis decreases. With less blood coming into the penis, the veins are not compressed, allowing blood to drain out of the penis, and the erection goes down.
Research has shown that the same eating patterns that can cause heart attacks due to restricted blood flow in the coronary arteries can also impede blood flow to and within the penis. The blood flow is needed for the penis to become erect. Diets that include very few fruits and vegetables along with lots of fatty, fried, and processed foods can contribute to decreased blood circulation throughout the body.
Although ED can become a permanent condition, this typically isn’t the case for men who experience occasional erectile difficulties. If you have diabetes, you may still be able to overcome ED through a lifestyle that includes sufficient sleep, no smoking, and stress reduction. ED medications are usually well-tolerated, and can be used for many years to help overcome any ED problems.

Qaseem, A., Snow, V., Denberg, T. D., Casey, D. E., Forciea, M. A., Owens, D. K., & Shekelle, P. (2009). Hormonal testing and pharmacologic treatment of erectile dysfunction: A clinical practice guideline from the American College of Physicians. Annals of internal medicine, 151(9), 639-649. Retrieved from http://annals.org/aim/article/745155/hormonal-testing-pharmacologic-treatment-erectile-dysfunction-clinical-practice-guideline-from

A full battery of labs was ordered and returned normal. A PCDU was ordered which revealed normal arterial inflow with velocities greater than >40 cm/sec with increased end diastolic velocities suggestive of venous leak. After pharmacologic erection, he developed a partial erection that resolved within 1 minute. This was consistent with a diagnosis of venous leak impotence. Pharmacologic cavernosography was performed and revealed bilateral crural leakage. He underwent infrapubic bilateral crural ligation of the penis, which cured his ED. The patient returned to clinic 6 months later with recurrent impotence. A pharmacologic cavernosography revealed recurrent venous leak. Additional crural ligation via a perineal approach was performed. Two months later he reported normal penile erections, and the result has lasted for more than 5 years. He continues to follow up annually in clinic.
*All medications have both common (generic) and brand names. The brand name is what a specific manufacturer calls the product (e.g., Tylenol®). The common name is the medical name for the medication (e.g., acetaminophen). A medication may have many brand names, but only one common name. This article lists medications by their common names. For information on a given medication, check our Drug Information database. For more information on brand names, speak with your doctor or pharmacist.
When you become aroused, your brain sends chemical messages to the blood vessels in the penis, causing them to dilate or open, allowing blood to flow into the penis. As the pressure builds, the blood becomes trapped in the corpora cavernosa, keeping the penis erect. If blood flow to the penis is insufficient or if it fails to stay inside the penis, it can lead to erectile dysfunction.
To understand what happens in ED, it's helpful to know some anatomical basics. When aroused by either sensory or mental stimuli, the brain sends a signal through the nerves to the penis, causing the muscles there to relax. This opens up space for blood to flow in and engorge the penis. A membrane within the penis traps blood inside to help maintain the erection, which subsides when the penile muscles contract, forcing blood back into the rest of the body. Any number of things can go wrong in this process, leading to erectile dysfunction.
For obvious reasons, ED can be a sensitive subject, one that until relatively recently men were more likely to try to hide than to deal with. Fortunately, a deeper understanding of the variety of causes of erectile dysfunction has led to medications, therapies, and other treatments that can be more individualized and more likely to be effective—and more open discussion about addressing the concern.

Lifestyle changes: One of the first things a young man can do to potentially improve or eliminate ED is make positive choices that will also have an impact on the rest of his life. Some changes a man can consider include increasing exercise, eating a heart-healthy diet, quitting smoking, and drinking alcohol only in moderation. Where a man has relationship problems, seeking counseling may also be helpful.
Vacuum therapy devices have a few disadvantages. One must interrupt foreplay to use them. You must use the correct-size tension ring and remove it, to prevent penile bruising, after sustaining the erection for 30 minutes. Initial use may produce some soreness. Such devices may be unsuitable for men with certain bleeding disorders. In general, vacuum constriction devices are successful in management of long-term ED.
×