Thanks to miniaturized sleep labs, scientists are able to track the quirky ways animals snooze in risky environments.