The thalamus is a midline brain structure that relays sensory and motor signals to the cerebral cortex. It regulates consciousness, sleep, and alertness. The thalamus contains several nuclei that have different functions. Lesions in the thalamus can cause sensory loss or a thalamic syndrome on the opposite side of the body, characterized by spontaneous pain.