Polysomnography, commonly known as a sleep study, is a comprehensive test used to diagnose sleep disorders. It records several physiological variables during sleep, such as brain waves (EEG), eye movements (EOG), muscle activity (EMG), heart rhythm (ECG), and breathing functions. By analyzing these parameters, healthcare providers can identify various sleep disorders, including sleep apnea, narcolepsy, restless legs syndrome, and insomnia.