If an NPC is sneaking up on a sleeping PC, or vice versa, is the sleeping person allowed a Listen check? If so, is there a penalty applied because they are sleeping?
Or the simple first-level spell alarm. Or a nocturnal familiar (a sorceror or wizarc can get an owl, let it sleep by day, and keep watch by night - keep it well-fed, and it won't need to hunt for itself ...), or even animal companion.
At higher levels, there's always Leomund's Secure Shelter -an alarm spell AND securely-locked door and windows set into supernaturally-strong walls ...