When you get up, if you're having trouble getting straight again, you could try holding (with both hands) the top of a door - one that's on quite well!! Then gradually stand on tip-toes to let yourself kind of half-hang from the door. It's great for realigning everything.
Hope you managed to get some sleep.