In some cases, nocturnal penile tumescence testing is performed to find out whether the man has erections while asleep. Healthy men usually have about four or five erections throughout the night. The man applies a device to the penis called a Rigiscan before going to bed at night, and the device can determine whether he has had erections. (If a man is able to have normal erections at night, this suggests a psychological cause for his impotence.)
Radical prostatectomy for the treatment of prostate cancer poses a significant risk of ED. A number of factors are associated with the chance of preserving erectile function. If both nerves that course on the lateral edges of the prostate can be saved, the chance of maintaining erectile function is reasonable. The odds depend on the age of the patient. Men younger than 60 years have a 75-80% chance of preserving potency, but men older than 70 years have only a 10-15% chance.
The Cancer of the Prostate Strategic Urologic Research Endeavor (CaPSURE) study, designed to determine whether an individual man’s sexual outcomes after most common treatments for early-stage prostate cancer could be accurately predicted on the basis of baseline characteristics and treatment plans, found that 2 years after treatment, 177 (35%) of 511 men who underwent prostatectomy reported the ability to attain functional erections suitable for intercourse. 
Parasympathetic pathways originate from the intermediolateral cell columns of the 2nd, 3rd and 4th sacral spinal cord segments. Preganglionic fibers pass through the pelvic plexus where they coalesce with sympathetic fibers from the superior hypogastric plexus. The cavernous nerves that innervate the penis arise from the portion of the pelvic plexus. The pelvic plexus also contains nerves that innervate the rectum, bladder and urinary sphincter and the nerve projections can be damaged during radical excision of the bladder, prostate and rectum, leading to iatrogenic ED (4).
The PDE5 inhibitors sildenafil (Viagra), vardenafil (Levitra) and tadalafil (Cialis) are prescription drugs which are taken orally.:20–21 Additionally, a cream combining alprostadil with the permeation enhancer DDAIP has been approved in Canada as a first line treatment for erectile dysfunction. Penile injections, on the other hand, can involve one of the following medications: papaverine, phentolamine, and prostaglandin E1, also known as alprostadil.:25
Cosgrove et al reported a higher rate of sexual dysfunction in veterans with posttraumatic stress disorder (PTSD) than in veterans who did not develop this problem.  The domains on the International Index of Erectile Function (IIEF) questionnaire that demonstrated the most change included overall sexual satisfaction and erectile function. [43, 44] Men with PTSD should be evaluated and treated if they have sexual dysfunction.
Usually there will not be a specific treatment that will lead to the improvement of erectile dysfunction. However, there are treatments that will allow erections to happen and can be used to allow sexual activity to take place. There are three main types of treatments: non-invasive treatments such as tablet medicines and external devices (e.g. vacuum device); penile injections; or for men who have not had success with other treatments, surgery may be an option.
The phrase “use it before you lose it” can be applied when it comes to helping men with ED regain normal erectile function. Pelvic exercises, more commonly known as kegel exercises, are used to promote urinary continence and sexual health. They help to strengthen the bulbocavernosus muscle, which does three things: allows the penis to engorge with blood during erection, it pumps during ejaculation, and it helps empty the urethra after urination, according to Healthline.
There are two kinds of surgery for ED: one involves implantation of a penile prosthesis; the other attempts vascular reconstruction. Expert opinion about surgical implants has changed during recent years; today, surgery is no longer so widely recommended. There are many less-invasive and less-expensive options, and surgery should be considered only as a last resort.
I would think the 25% is just an average. Some men never have a problem with erections. Some healthy men in their 60's never have a problem with their erections -- no Viagra needed at all, thank you. And, no, it is NOT completely associated with age. In fact, many men in their 40's and even younger, are already dealing with ED, especially if they smoke, are obese, don't exercise, or are addicted to porn, among other things. In fact, even men in their 20's and 30's can have these problems.
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.