When men sleep during the night, they get erections several times. It is normal for a guy to always get an erection while they are in their REM stage.
The erections being referred to here is the ones that occur during the night. These are known as nocturnal erections, and they happen while you sleep. These night erections begin in men in their early years, but it continues all through a man's adult life. They occur during rapid eye movement (REM) sleep - this is the stage where dreams occur during sleep.
Though, these instinctive erections are in no way connected to sexual excitements and dreams. They happen due to the flow blood into the penis following the actions of neurological stimulators. This helps maintain the health of the penile tissues while ensuring the proper and efficient delivery of oxygen.
Men hardly notice these erections, but they often encounter them once they wake up in the morning. There is an average of 4-5 of such hard wood episodes before daybreak, and it happens to everyman.
Men who find it difficult to maintain an erection as a result of certain psychological disorders still have these involuntary erections during the night.