Diabetes and Erectile Dysfunction: Why the Link Is Strong
Sustained high blood glucose damages the blood vessels and nerves that erections depend on. What NIDDK and clinical reviews report on diabetes and ED.
How anxiety switches on the nerve signals that keep an erection from happening, what makes the cycle repeat, and what the evidence says helps.

Performance anxiety erectile dysfunction is trouble getting or keeping an erection that is driven mainly by worry about sexual performance rather than by a problem with blood vessels, nerves or hormones.
The StatPearls1 review of erectile dysfunction lists performance anxiety and depression among the factors that can contribute strongly even when an organic cause is present, and says a sudden, unexplained onset is almost always psychogenic. The problem feeds itself: having ED increases stress and lowers self-esteem, which gets in the way of the next attempt.
An erection runs on nerve and blood vessel events that sexual stimulation sets off.
StatPearls1 describes erection as starting with signals that travel through the parasympathetic nerves of the S2 to S4 sacral plexus to the penis through the cavernosal nerves. Nitric oxide released by those nerve terminals begins the process, and nitric oxide from endothelial cells maintains it.
Blood flow into the corpora cavernosa rises, the tissue fills and presses on the emissary veins, and the blood stays in.
Sexual stimulation is what releases that nitric oxide, so attention matters. StatPearls makes the same point about medication: PDE-5 inhibitors such as sildenafil do not start the erectile response, and sexual stimulation is still required.
Erection trouble is upsetting in itself, and that upset feeds the next attempt.
According to StatPearls1, most men with ED do not have an underlying psychological cause, but having ED damages relationships, increases stress, diminishes self-esteem and creates anxiety, all of which interfere with a successful outcome. An erection problem with a physical starting point can still pick up an anxious layer.
Overlap with other sexual problems is common. At least 30%, and up to 60%, of patients with ED also have premature ejaculation, and treating the ED often relieves it, because performance anxiety drops.
Certain patterns in the history suggest a psychological driver. StatPearls1 lists sudden onset, especially around a new partner or a major life change, situational ED, normal erections with masturbation or a different partner, good morning erections, and large day-to-day variability in rigidity.
Nocturnal erections matter here, because they need the whole nerve and blood vessel system to work. StatPearls describes an average of three to six erections a night, and says formal overnight testing is rarely used now, because a careful sexual history usually identifies the psychogenic factors.
Treat these as pointers, not a diagnosis. ED can be the first symptom of silent cardiac or vascular disease, so a full cardiovascular workup is advised in anyone without an obvious cause. Our articles on what causes erectile dysfunction and erectile dysfunction as an early sign of heart disease cover that in more detail.
The American Urological Association2 treats the psychological side as part of every ED workup. Its 2018 ED guideline includes the clinical principle that "men presenting with symptoms of ED should undergo a thorough medical, sexual, and psychosocial history; a physical examination; and selective laboratory testing."
Partners have a place in that assessment. According to StatPearls1, with the patient's permission the partner should be present for the history, and involving them in treatment can improve the outcome.
The trial evidence that structured therapy helps men with non-organic ED is modest rather than definitive.
Bilal and Abbasi published a randomized placebo-controlled trial in Sexual Medicine3 in 2022 comparing sildenafil citrate, cognitive behavior sex therapy (CBST) and an integrated treatment of both in men diagnosed with non-organic ED. Both the CBST group and the integrated treatment group improved IIEF-5 erectile function scores significantly compared with placebo, with no significant difference between CBST and integrated treatment.
The CBST group had a larger reduction in depression scores than the sildenafil citrate group and than the integrated group.
Read that as a result about therapy rather than a verdict on medication. It is one trial, in men selected for non-organic ED, using Urdu-language versions of the IIEF-5 and DASS-21 questionnaires. StatPearls1 describes oral PDE-5 inhibitors as the usual first-line treatment for ED, effective across a wide range of causes, with an overall success rate of up to 76%.
StatPearls recommends offering psychosexual counseling to men whose ED has a psychological cause and, with the patient's consent, to the partner as well. It notes that involving mental health clinicians can reduce performance anxiety, improve treatment adherence and set realistic expectations, and it puts lifestyle change first for most men, including more physical activity and stopping smoking.
Who should not take them
Some people should not take PDE-5 inhibitors. According to StatPearls:1
The 2018 AUA guideline says the same: men who take nitrates regularly should not use PDE-5 inhibitors.2
According to StatPearls, one-third to one-half of over-the-counter products sold for sexual performance have been found to contain PDE-5 inhibitors, which makes them dangerous for anyone on nitrates.
Side effects
Side effects are common and usually mild. StatPearls reports adverse events in about 40% of patients, most often:
It also records rare reports of permanent vision loss and of hearing loss in one ear.
Urgent: Get emergency care
Get emergency care for an erection that will not go down:
Whether a medication is appropriate at all, and which one, is for the prescribing clinician to decide with you.
Talk to a clinician if erection difficulty has lasted more than a few weeks, even if you are sure it is "just nerves". Some situations call for medical review rather than self-management:
Seek urgent care for chest pain, pressure or breathlessness on exertion. If you have thoughts of harming yourself, call or text 988 in the US for the Suicide and Crisis Lifeline, or go to an emergency room.
It can contribute strongly. StatPearls1 lists performance anxiety and depression as factors that can play a large part even when an organic cause is also present, and sudden onset tied to a new partner or a major life event, with normal morning erections, points that way. A clinician still checks for physical causes first.
The history usually sorts it. Erections that work in some situations and not others, large variation from day to day, and preserved morning erections point toward psychogenic ED, according to StatPearls1.
The sources here do not answer that. StatPearls1 does say that ED increases stress and creates anxiety, which interfere with a successful outcome, and that psychosexual causes generally respond well to counseling.
Not by itself. StatPearls1 says PDE-5 inhibitors do not start the erectile response, so sexual stimulation is still needed. In the 2022 trial by Bilal and Abbasi, the cognitive behavior sex therapy group had a larger drop in depression scores than the sildenafil citrate group, while both that group and the integrated treatment group improved erectile function scores compared with placebo. Which approach suits you depends on your health history and current medicines.
Opening soon
SimpleHumans is opening soon. Join the early-access list and you'll be first to know when we launch — plus an exclusive discount reserved for people who sign up before we open.
You're on the list
Thanks for joining. We'll email you when we launch, along with your founding-member discount.