In the context of sleep disorders, Ray is exhibiting symptoms of sleep terrors (night terrors).
Sleep terror is a sleep disorder and an undesired occurrence in which an affected person screams and experiences intense fear while still asleep. Sleep terror incidence usually continue from seconds to a few minutes, but it may last longer. During a sleep terror, an individual might have any of these symptoms; fast breathing and a quicker heartbeat, sweating, screaming in distress, and acting upset and afraid.