If you just got off solo, you might have to wait before you can hop into bed with your partner, says Dr. Brahmbhatt. It might have something to do with a spike in the hormone prolactin after you orgasm, according to a study published in the International Journal of Impotence Research. This hormone has been linked to difficulties maintaining an erection or even ejaculating.
#6 It’s performance anxiety. Many men suffer from performance anxiety, and that’s another reason you can’t get hard. Simply put, you’re too nervous to get your dick up. And that’s okay, it happens! This is likely to happen if you haven’t had sex in a while or if you’re starting up with a new partner. Sex is supposed to be fun, but worrying over your prowess between the sheets can make sex the exact opposite of what’s it’s supposed to be. [Read: 13 ways to overcome sexual anxiety and perform]
Sexual dysfunction is highly prevalent in men and women. In the MMAS, 52% of the respondents reported some degree of erectile difficulty. Complete ED, defined as (1) the total inability to obtain or maintain an erection during sexual stimulation and (2) the absence of nocturnal erections, occurred in 10% of the respondents. Mild and moderate ED occurred in 17% and 25% of responders, respectively. 
inability of the male to achieve or maintain an erection of sufficient rigidity to perform sexual intercourse successfully. An impotent man may produce sufficient numbers of normal spermatozoa; the condition is related to infertility only insofar as it prevents coitus with and impregnation of the female partner. Called also erectile dysfunction. adj., adj im´potent.
Erectile dysfunction (ED) affects 50% of men older than 40 years,  exerting substantial effects on quality of life.  This common problem is complex and involves multiple pathways. Penile erections are produced by an integration of physiologic processes involving the central nervous, peripheral nervous, hormonal, and vascular systems. Any abnormality in these systems, whether from medication or disease, has a significant impact on the ability to develop and sustain an erection, ejaculate, and experience orgasm.
In a prospective study from the Prostate Cancer Prevention Trial database, Thompson et al reported that men presenting with ED had a significantly higher chance of developing a cardiovascular event over a 7-year follow-up period.  The hazard ratio was 1.45, which is in the range of risk associated with current smoking or a family history of MI.