Polysomnography (sleep study):

Polysomnography is a sleep study that is used to diagnose sleep disorders. During the test, certain body functions are recorded as you sleep or try to sleep.