Is it okay to lay on your back at all?

Braelyn • Baby #1 due June 1st
Sometimes I just lay in bed on my phone or watching a movie and I lay on my back, but then I switch to my side or stomach real quick because I heard it's not good for the baby! Why is it not okay to lay on your back.. And  what's an okay amount of time that we can lay on our back... I feel like 20 minutes or so laying on my back can't be harmful.. But maybe I'm wrong.