Maybe instead of planning to sleep with them you could have a comfy chair in their room. That way you have somewhere to rest if you feel they need you in there, but you aren't actually in bed with them. It would make it easier to leave when they are asleep.