The reticular activating system, also known as the extrathalamic control modulatory system, is a set of connected nuclei in the brains of vertebrates that is responsible for regulating wakefulness and sleep-wake transitions, and also for promoting motor control of posture.

https://www.youtube.com/watch?v=QCnfAzAIhVw