Sleep studies, called polysomnograms, are used to diagnose sleep disorders. The test records a patient's brain waves, blood oxygen levels, heart rate and breathing, as well as eye and leg movements.