Sleepy on back

Ci

Is it bad to sleep on your back? My hips be sore when I wake up in the morning from sleeping on them. I sleep better on my back.