Occasionally, during our most active period of REM sleep, waking awareness flickers on in the tunnel of dreaming consciousness. The sleeper—fully outfitted with memory, reason, intentionality and self-awareness—is able to mindfully explore the form and texture of the dream world.
Welcome to the factory floor of the mind.
Wikipedia Link