The message for trying to sleep at the wrong time implies that you can only sleep at night during a thunderstorm
The bug
The message "You can sleep only at night and during thunderstorms" implies that both mentioned conditions must be met in order to sleep (which just sounds wrong IMO). A simple fix is to change the "and" to "or".