sleeping positions

So I'm almost 30 weeks pregnant and I find my self waking up on my back (it's so comfy to me) I lay on my left and right side but due to my legs going numb and also the tops of my legs getting a little swollen, idk if my body is naturally turning on it's back or if it's because my legs are going numb up top. Anyone have this problem ? Is it ok to lay on ur back as long as it's not all night? My obgyn recommendeds not laying on my back for long periods of time but my body is naturally doing it without waking me ?