My OB said sleep however you are most comfortable. I go to sleep on my side, but wake up on my back all the time. We are told not to sleep on our backs because the weight of the fetus may compress the inferior vena cava. This is a possibility in some pregnancies, but not all. If your IVC is being compressed in a way that your blood pressure is being affected enough to affect the baby, you would know it--you'd feel short of breath, lightheaded, etc. Listen to your body. Besides... losing sleep (literally) because you aren't allowing yourself to be comfortable can be a negative thing too. Sleep is important!
You can't lay flat on your back as your uterus is getting heavier it cuts off circulation to the vein that carries blood from your heart down to your uterus and placenta and it also slows baby's heart beat down. Best to lay on your left side to keep blood pressure from rising it helps to put a pillow in front of you so you can kind of lean forward onto the pillow