Have you ever played a video game where you have to sleep to recover? They only let you do it if everything is safe. Otherwise they won’t let you sleep. You’ll get a message, saying “You cannot sleep now, there are monsters nearby.”
Now, remember the last time you just couldn’t get to sleep?