Weird. That sucks.
Try stretching before you sleep. Especially this stretch, with your butt right up against the wall.
I started doing this recently and it has done wonders for my sleep. I stay in that pose for a minute or two just before climbing in to bed.