It can also help to tell your partner (either before you start or when it happens) that hey, sometimes it takes your penis a while to warm up or sometimes it comes and goes as it pleases — and that they shouldn't take it personally and you won't let it ruin the moment. When it happens, take a few deep breaths, focus on your partner, and go back to doing whatever was feeling good before. "If they approach that with authentic confidence, the partner is usually like 'OK, cool,'" says Skyler. "Remember, you're more than just your penis."
Stiffy Solution: The good news is, almost all of these conditions can be successfully treated if you catch them early on. And since erectile problems may be the first side effect your dude has experienced, seeking medical treatment for his erectile problems may be the thing to get him into a doctor's office. So if your dude is a well-rested, non-drinking, non-smoking, paragon of relaxation who suddenly can't get wood, urge him to talk to his doctor — his misbehaving penis may actually be communicating something way more important than "Not tonight, honey."
It appears that testosterone has NOS-independent pathways as well. In one study, castrated rats were implanted with testosterone pellets and then divided into a group that received an NOS inhibitor (L-nitro-L-arginine methyl ester [L-NAME]) and a control group that received no enzyme.  The castrated rats that were given testosterone pellets and L-NAME still had partial erections, a result suggesting the presence of a pathway independent of NOS activity.
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.
Erections are neurovascular events, meaning that nerves and blood vessels (arteries and veins) are involved in the process of an erection and all must work properly to develop a hard erection that lasts long enough. Erection begins with sexual stimulation. Sexual stimulation can be tactile (for example, by a partner touching the penis or by masturbation) or mental (for example, by having sexual fantasies, viewing porn). Sexual stimulation or sexual arousal causes the nerves going to the penis to release a chemical, nitric oxide. Nitric oxide increases the production of another chemical, cyclic GMP (cGMP), in the muscle of the corpora cavernosa. The cGMP causes the muscles of the corpora cavernosa to relax, and this allows more blood to flow into the penis. The incoming blood fills the corpora cavernosa, making the penis expand.
Fact is, almost all men experience erection problems from time to time. Sometimes it's a temporary condition that will go away with just power of mind or little treatment. But unfortunately in many cases it may be an ongoing problem. Whatever it is, if you don't want to eventually destroy your self esteem and harm relationship with your lover, immediate treatment is required.