vestan,
If I understand you correctly, what you're describing is a matter of how the game engine works when evaluating each NPC's AI packages. With very few exceptions (only SKSE and ENB, that I can think of), no mod really changes or adds to the Skyrim engine. We just do what we can within the engine (which is a lot, but not eveything).
The way the engine works wrt NPC artificial intelligence (AI packages):
1) Each NPC is placed in a specific location. Whether a vanilla NPC or from a mod, every single NPC has a specific location where they stand when the game is first loaded. When you first enter an area, this is where they will be.
2) The NPC AI checks the instructions that have been added to the NPC (the packages) to evaluate what to do next. For example, instructions may say "at 10PM, go to sleep in your own bed in your house for 8 hours." So, that is what the NPC will do.
3) HOWEVER, the NPC has to get there... And that is probably what you're noticing. If you stand in front of the NPC's bed and wait (real time) until their sleep time comes, they will sleep normally. If you use the wait function to the middle of their sleep time, they will not magically be in bed at the end of it. When you use the wait menu to go to 2AM, they will then realize it and go to bed at that time.
So you will probably notice a lot of people shuffling around after waiting via the wait menu and when entering areas.