PSG is a test that electronically records your muscle movement, breathing, and other physical actions while you sleep. You’ll arrive at a sleep lab about two hours before your usual bedtime. You’ll sleep in a private bedroom with a central monitoring area for technicians to track your sleep overnight.