I think the reason why Lydia doesn't sleep in her bed is because it's backwards. I noticed that when I first opened the CK. It's a CommonBed01R... which means that Lydia can't use it because the entry point is on the side of the angled wall. Her Sandbox AI package allows for sleeping, but since she can't enter her bed to meet those requirements, she's stuck in the loop of being in your room.
I'm not 100% sure this is the case though. I'm still trying to figure out how Skyrim works with the little time I have allocated for it, but I'm learning.
