Subjects were randomized to a sleep deprivation or control condition , with performance testing at baseline , after 2 nights of total sleep deprivation ( or rested control ) , and following 2 nights of recovery sleep .