Well, arcane casters don't need to sleep for 8 hours, they need to rest for 8 hours. They could just sit in a chair and let their minds wander.
As for divine casters, the rules say that if they miss their time they need to pray as soon as possible, or just give them a divine alarm clock that...