Diabetes is a well-recognized risk factor for ED. A systematic review and meta-analysis found that the prevalence of ED was 37.5% in type 1 diabetes, 66.3% in type 2 diabetes, and 52.5% in diabetes overall—a rate approximately 3.5 times higher than that in controls.  The etiology of ED in diabetic men probably involves both vascular and neurogenic mechanisms. Evidence indicates that establishing good glycemic control can minimize this risk.
Despite how many men want to think that their dick has some autonomous powers of decision making, it all comes back to the brain, and if your brain is firing off stress signals, then your penis is going to need more than just mucho volition to come to life. Erections start in your head. Be it something you smell, feel, or see, it's all about the chemicals up top sending signals down there.
Sexual stimulation causes the release of neurotransmitters from cavernosal nerve endings and relaxation factors from endothelial cells lining the sinusoids. NOS produces NO from L-arginine, and this, in turn, produces other muscle-relaxing chemicals, such as cGMP and cyclic adenosine monophosphate (cAMP), which work via calcium channel and protein kinase mechanisms (see the image below). This results in the relaxation of smooth muscle in the arteries and arterioles that supply the erectile tissue, producing a dramatic increase in penile blood flow.
If you bike a lot and have a very narrow saddle on your bicycle, consider switching to a "no-nose seat" which is wider at the back than a conventional saddle, allowing more of your weight to be distributed to the sitting bones. Make sure the seat is level or angled slightly downward and at a height that allows your knee to be just slightly bent at the bottom of the pedal cycle. Raising the handlebars on your bike so that you're sitting upright may also help.
Look into natural remedies. If you're not interested in drugs and devices, see a homeopathic practitioner who can advise you as to what natural remedies might help manage your ED. While no studies have been conducted to prove that these remedies work for everyone, some men have found that acupuncture, herbal medicines, and "herbal Viagra" can be useful.
In comparison, 37% of men who had received external radiotherapy as their primary therapy reported the ability to attain functional erections suitable for intercourse, along with 43% of men who had received brachytherapy as primary treatment. Pretreatment sexual health-related quality of life score, age, serum prostate-specific antigen (PSA) level, race or ethnicity, body mass index, and intended treatment details were associated with functional erections 2 years after treatment. 
Recently, the US Food and Drug Administration (FDA) has issued a safety announcement regarding TRT. In part it reads ‘The benefit and safety of these medications have not been established. We are also requiring these manufacturers to add information to the labeling about a possible increased risk of heart attacks and strokes in patients taking testosterone.’37
Finally, there are NO-releasing polymers that are capable of delivering NO in a pharmacologically useful way. Such compounds include compounds that release NO upon being metabolised and compounds that release NO spontaneously in aqueous solution. Initial animal studies suggest that cavernosal injections of NO polymers can significantly improve erectile function.48
Experiencing ED can also be a reason to try not penetrative sex. Try planning a sex session with your partner hat isn't focused on your erection at all. Things like kissing, licking, sucking, foreplay and teasing all are super stimulating and don't focus on penetration. Feel free to bring each other to orgasm using these ideas and see if you are able to relax and enjoy the experience. Many men feel like failures when their erections become unreliable. Having a few successful sexual sessions that lead to orgasm without penetration can put the fun back into having sex. Many couples find success using this technique and begin to reengage sexually instead of avoiding being sexual for fear of failure.
…have traditionally been classified as impotence (inability of a man to achieve or maintain penile erection) and frigidity (inability of a woman to achieve arousal or orgasm during sexual intercourse). Because these terms—impotence and frigidity—have developed pejorative and misleading connotations, they are no longer used as scientific classifications, having been…
A CVA can occur anywhere through the brain, midbrain, brainstem and spinal cord leading to varying degrees of SD depending on location. A decline in libido, erection and ejaculation are frequent in men who have had a CVA, with a reported prevalence of ED that varies from 17% to 48% (28,29). Right hemispheric infarcts seem to affect erections more so than left-sided ones. The exact effects of CVA on sexual function are complex and multifactorial, as disability, psychological and emotional status can affect sexual function aside from the location of the CVA.
Surgery: If neither drugs nor the vacuum pump works, your doctor may suggest surgery. With surgery, the doctor can place a device in your penis that will cause enough hardness for intercourse. In a few cases, infections may develop after the operation, and the doctor may have to remove the device. Another operation that may help you is rebuilding the blood vessels in the penis to increase blood flow into the penis or decrease blood flow out of the penis. These procedures can help you to get and maintain an erection.
There are many effective treatments for impotence. The most popular is a class of drugs called phosphodiesterase type 5 (PDE5) inhibitors. These include sildenafil (Viagra), vardenafil (Levitra), tadalafil (Cialis) and avanafil (STENDRA). These drugs are taken in pill form. They work in most men. But they are less effective in men with neurological causes of impotence.
Over a 2-year period, a third of the men randomized to a weight loss program demonstrated resolution of erectile dysfunction.10 A Mediterranean diet and nutritional counseling reported increased erectile quality.18 Little evidence supports that increased physical activity alone improves erectile quality; however, the strong association between physical activity and lower BMI is well described, and therefore recommended for men with erectile dysfunction and without a contraindication to physical activity.
There are risks to prosthetic surgery and patients are counselled before the procedure. If there is a post-operative infection, the implant will likely be removed. The devices are reliable, but in the case of mechanical malfunction, the device or a part of the device will need to be replaced surgically. If a penile prosthesis is removed, other non-surgical treatments may no longer work.