Sleeping/laying on back

I've seen on here before that you shouldn't lay on your back for too long while pregnant. I'm just wondering how true that is and why it's a bad idea. Obviously I can't lay on my stomach right now, and my legs cramp when I lay on my sides. Laying propped up on my back is the only position that helps relieve any pain.