I've always wondered how (or even if) it's possible to get an NPC to sleep on a specific side of a double bed. I think they take whichever slot is closest to them, which is fine for the vanilla game since it doesn't matter where NPCs sleep.
The closest thing to a workaround I've found has been to make a discrete X-marker for each NPC/bed position combo, and use the X-marker as a target in the NPC's sleep package, with a small radius (5 or so). This works about 99% of the time, but not always, and I'm wondering if an even more reliable solution exists.