During a sleep study, the patient spends the night in a sleep laboratory or specialized facility equipped with monitoring equipment. Electrodes and sensors are placed on the scalp, face, chest, and legs to record various physiological parameters, including brain waves (electroencephalogram or EEG), eye movements (electrooculogram or EOG), muscle activity (electromyogram or EMG), heart rate, respiratory effort, and oxygen saturation. The patient's sleep stages, breathing patterns, and body movements are continuously monitored and recorded throughout the night. After the study, the data is analyzed by a sleep specialist to make a diagnosis and formulate an appropriate treatment plan. Home sleep studies, which involve portable monitoring devices worn by the patient at home, may also be conducted in certain cases for diagnosing specific sleep disorders such as sleep apnea.