sleep state analysis