The article suggests the same mechanism is used for danger perception. When REM sleeping you enter a state of deep paranoia. If you are conscious at the same time (what we call sleep paralysis) the fear is almost unbearable and you start hallucinating extreme danger and evil around you.