when is it bad to sleep on your back?

So I heard that at one point it because dangerous to lay on your back because of the blood flow to your baby being obstructed? Is this true? First time pregnancy and I'm 10 weeks 1 day and my backs been killing me and laying on it helps a lot instead of being on my side so I'm wondering if me laying on my back this early is still okay. I know baby is still fairly small still but I'm curious when it becomes dangerous! Lol thanks ladies :)