If he's on his side, I can use a variation on the classic Friends "hug... and roll".
My variation is a gentle squeeze, while at the same time nudging his bodyweight so it rolls away, back on his side. If he's on his front or back, this is more difficult and will usually require a less-subtle prod from my elbow or knee.
So... I can kinda understand why he didn't believe that when I accidentally (genuinely) smacked him in the eye socket the other morning, I swear I did it in my sleep and not on purpose... I woke up to the slow realisation that I had hit something fairly solid with my elbow, and rolled over to see him clutching his face, looking very confused and bewildered. But let's be honest here, he was obviously encroaching on my side in order to be within range of my bent arm.
From GBM's side, he doesn't see my problem. To be fair, his head is always on 'his' pillow. That's not my issue. The encroachment always happens from torso down, usually ending with his leg in the lower bottom half of 'my' side of the bed. This means that I have to contour to what space is left. I can't curl up, because this sends my knees into him, or off the edge of the bed. And I can't fully stretch out without having to kick him out the way first. Which is usually my choice of action; cos I've learnt that politely asking doesn't work.