Try placing pillows on each side of you. This may help you from being able to roll over in the middle of the night. Another solution would be to sleep in a recliner or chair that you are forced to sleep in one position.
I have been facing this problem since childhood. I always wanted to sleep on my back instead of side or stomach.
The pillow approach is also useful.
This approach worked for me and may or may not work for you:
Once I lay down on bed, I start to imagine myself sleeping on my back entire night and seeing myself in same position in morning.
It took around a year to see good results for me.
This is a solution which takes time to see results and you need patience.