A sleep study is a noninvasive test that electronically records activity in the brain and body during sleep. Learn about this procedure.