context: Back pain can make getting through the day hard, but it can make getting a good night's sleep even harder. It can be tough to find a comfortable position so you can doze off. And you might not even be able to get in and out of bed without pain. But good sleep is essential to your health, and an important part of your overall well-being. Studies have found that Americans who ranked their quality of life very good or excellent slept an average of 18 to 23 minutes longer than those who considered their health and quality of life poorer. If you're having trouble getting enough shut-eye because of back pain, try these tips that can make sleeping a little easier. Certain sleeping positions can help ease your back pain, so find one that is most comfortable for you. Try sleeping with a pillow between or underneath your legs for extra support. If you sleep on your side, put the pillow between your knees and draw them up slightly toward your chest. If you like to sleep on your back, try the pillow under your knees, or roll up a small towel and place it under the small of your back. Avoid sleeping on your stomach because it puts a lot of strain on your back. If it's the only position you can fall asleep in, put a pillow under your stomach to take some of the pressure off your back. The type of mattress you need depends on your body type. A soft mattress can be good if your hips are wider than your waist because it will let your spine stay straight while you sleep. If your hips and waist already line up straight, a harder mattress might feel better because it will give you more support. Doctors used to always recommend firm mattresses, but research has shown that people with low back pain actually sleep worse on very hard mattresses when compared to other kinds. But soft mattresses can cause problems, too. You may sink in too deep and your joints may twist and cause you more pain. Try sleeping on different kinds of mattresses, either at friends' houses, or in hotels, to see what feels best. If you think a harder mattress might help, put a sheet of plywood between your mattress and box spring, or try a few nights with your mattress on the floor to see if the extra support makes a difference in your pain. It may sound obvious, but be extra careful when you get in and out of bed. Bending forward at your waist or making quick and jerking motions can cause you more back pain. Take your time and roll over onto one side and use your arms to push your way up. You can then swing your legs out of bed to stand up slowly. Reverse the movements when it's time to lie down at night. Getting regular physical activity is a great way to improve the quality of your sleep. But doing targeted exercises to strengthen your core -- the muscles in your abdomen, hips, lower back, and pelvis -- can also help ease back pain. Building strength and flexibility in these muscles can lower the chances of you straining your back and experiencing muscle spasms during the night. Holding a plank position with your hands under your shoulders and your legs out straight can help tighten these muscles. Start by holding the pose for 15 to 30 seconds and try to maintain proper alignment, with your body in a straight line and your abdominal muscles engaged. Research has shown that yoga or intensive stretching can help reduce low back pain. It can also help reduce your stress and make you sleep better. Talk to your doctor about which poses are safe for you to practice and which ones won't make your pain worse. It might be helpful to start off using yoga props like blocks and bolsters for added support so that you can hold poses comfortably. And taking a few yoga classes with an instructor to be sure you're doing the poses and breathing correctly -- which is key to relaxation -- isn't a bad idea either.