Polysomnography, or sleep test, is a procedure that is performed all night long with the help of medical devices to determine the quality of sleep and to find the cause of sleep disturbance. With this method, brain waves, depth of sleep, rhythm and depth of breathing, frequency and level of snoring, respiratory arrest and duration, the oxygen level in the blood, body movements, changing lying position, and heart rhythm are measured.