I know what you mean about getting your feelings hurt: you're just fine and hunky-dorey until THEY come over, and then you're chopped liver

. Well, maybe not "chopped liver": they *like* that
Mine were like that when my grandson spent the weekend. Then the entire family moved back in, and now they could care less and are back sleeping with us.
I have stairs at the foot of the bed; the dogs can come and go at their leisure. One will start off sleeping with us, then go to the crate some time after we're asleep. I wake up during the night, and the other one is up on the bed. Later, maybe they BOTH are on the bed - or both on the floor or in their crate.
They have options. I don't force them, and that seems to work better. My husband has cancer; he doesn't sleep well and sometimes get restless after treatments. So maybe that's why they leave during the night: they don't like getting bounced around.