I fail to get an erection

I am 27 years old. In the past, just looking at a beautiful woman would cause an erection but now I fail to get one even when I sleep with a woman in the same bed. Why?

Dear July,
Erection problems can come with age, sometimes as early as 50 years. However, at 27, psychological problems may be to blame for failure to get an erection.
Following positive thoughts, imaginations, emotions and what one senses, a man may then get an erection. Erections also occur during REM type of sleep.

However, negative thoughts or emotions including anger, sadness, fear, prejudice, guilt, stress and anxiety coupled with fatigue, erections may fail to happen or if one gets involved in a sexual act, it may be disappointing.

As one gets older, arousal, climaxing, ejaculation and resolution all take much longer but these may also be affected by negative thoughts, imaginations and emotions. It is important to find out what is leading to your problem so that this can be solved. Otherwise once in a while a human may suffer sexual issues, which if they last, may require a sexual counsellor or doctor to address.