When stimulated by the nerves, the spongy tissue arranges itself in such a way that more blood can be stored in the penis. The veins running through the outer sheath of the penis then compress which stops the blood from leaving the penis. As the blood is stopped from flowing out, the penis fills with blood and stretches within the outer casing, giving an erection.
early 15c., "physical weakness," also "poverty," from Middle French impotence "weakness," from Latin impotentia "lack of control or power," from impotentem (nominative impotens); see impotent. In reference to a want of (male) sexual potency, from c.1500. The figurative senses of the word in Latin were "violence, fury, unbridled passion." Related: Impotency.
The rumors are true. Having too much to drink can interfere with a man’s ability to have an erection. According to Everyday Health, alcohol is a depressant. This means that, along with dampening your ability to think, speak, and move efficiently, it can also dampen mood, decrease sexual desire, and make it difficult for a man to achieve erection or reach an orgasm. This is because alcohol decreases blood flow to the penis. That not only may reduce a man’s ability to have an erection, but even if he is lucky enough to get it hard, alcohol can reduce the intensity of his orgasm.

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. 
There are hundreds of medications that have the side effect of ED and/or decreased libido. Examples of drugs implicated as a cause of ED include hydrochlorothiazides and beta-blocking agents. Medications used to treat depression, particularly the SSRIs such as citalopram (Celexa), escitalopram (Lexapro), fluoxetine (Prozac, Prozac Weekly, Sarafem), fluvoxamine (Luvox, Luvox CR), paroxetine (Paxil, Paxil CR, Pexeva) and sertraline (Zoloft), may also contribute to ED.9 Bupropion (Wellbutrin) which has a predominant effect on blocking the reuptake of dopamine is an antidepressant with lower incidence of ED.10 The side effects of 5ARIs occurring in fewer than 5% of patients can include gynaecomastia, ED, loss of libido and ejaculatory dysfunction.11
It is important that physicians and other health care providers treating patients for chronic conditions periodically inquire into the sexual functioning of their patients and be prepared to offer counsel for those who experience erectile difficulties. Lack of sexual knowledge and anxiety about sexual performance are common contributing factors to erectile dysfunction. Education and reassurance may be helpful in preventing the cascade into serious erectile failure in individuals who experience minor erectile difficulty due to medications or common changes in erectile functioning associated with chronic illnesses or with aging.
You're right that this should be a last resort, but Paduch also agrees that sometimes a little confidence can help you get back on track. The thing is, you should only take an ED medicine if it's prescribed by your doctor (otherwise you'll miss out on the important medical info you should know before you take it). Another option is an l-arginine supplement, which can increase nitric oxide and blood flow.
An alprostadil cream that patients apply into the tip of the penis (the urethral meatus, the opening that urine passes through) is currently available in the UK and Europe. It is currently under review by the U.S. Food and Drug Administration (FDA). After application of the cream, an erection occurs within five to 30 minutes, and the erection lasts one to two hours in men who respond to the cream. Doctors recommend that one use the cream for a maximum frequency of two to three times per week and no more frequent than once every 24 hours. It has essentially the same contraindications and side effects as the other formulations of alprostadil. The cream may cause vaginal burning in roughly 4% of partners. Men should not use alprostadil cream for sexual intercourse with women of childbearing potential unless a condom is used. Researchers have performed controlled trial studies to evaluate the safety and effectiveness of this drug. Overall, 52% of men reported improvement in their erections compared to 20% of men receiving placebo. A later analysis demonstrated that 36% of men using the alprostadil cream had a clinically relevant improvement in vaginal penetration ability and 31% clinically relevant improvement in ability to have successful intercourse to ejaculation.

ED usually has something physical behind it, particularly in older men. But psychological factors can be a factor in many cases of ED. Experts say stress, depression, poor self-esteem, and performance anxiety can short-circuit the process that leads to an erection. These factors can also make the problem worse in men whose ED stems from something physical.
×