How should I sleep in order to have a good posture?

If you sleep on your back, put a pillow below your bottom, so the back can be flat. If you sleep on one of the sides, put a pillow between your legs so you don’t flex the waist bones. And, you shouldn’t sleep on your stomach because you press incorrectly the bones of your spine.