The inability to fall or stay asleep is the most common sleep complaint among Americans especially those with chronic back pain. There are many factors that may be contributing to your insomnia.

Did you know certain sleeping positions may exacerbate your back pain? Or that, on the contrary, there are specific positions that can ease the strain of an aching back? Even the lighting in your room, your sleeping attire, and what you do before calling it a day will impact how well you sleep with back pain.

If you’re wondering what the best mattress for back pain is and what’s the healthiest sleeping position, these four tips can turn restless into restful to get you the sleep your body needs.

It’s All About the Lighting

You may want to consider darkening the overhead light in your room when you preparing to fall asleep. Consider adding dark colored window curtains to black out the room and diminish any colorful distractions. Studies show that blue light from televisions, smartphones, or computer screens also make it harder to fall asleep. This light prevents your brain from releasing melatonin, the hormone that tells your body it’s time for bed. Instead of scrolling through your newsfeed while in bed, choose a dim nightlight, soothing music, and a paperback book to help you get into a relaxed state.

Clinical Professor of Psychiatry at the University of California, Los Angeles (UCLA), School of Medicine, Dr. Dan Siegel, explains, “People are exposing their eyes to this stream of photons from these objects that basically tells your brain, ‘Stay awake! It’s not time to go to sleep yet.’”

Siegel conducted a study of nearly 850 (18–94 years old) adults reporting that using a mobile phone after turning the lights off was associated with poor sleep quality, increased insomnia, and heightened symptoms of fatigue. If you must lay in bed with a device, use sleep mode. This turns off the blue lights that keep your brain awake.

However, when it comes to sleeping positions, the best way to reduce back pain would be to sleep on your back.

Switch Your Sleeping Position

One way to help your back as you sleep is to maneuver yourself into different sleeping positions. Try placing a pillow in-between your knees to provide your cervical and thoracic spine with much-needed support, or lie flat on your back to decrease pressure on your lower back and spinal discs, advises John Hopkins Medicine Orthopaedic Surgery Division.

Much like sleeping on your back, side sleepers should place a pillow between the knees to provide additional cervical support. Evidence suggests that habitually sleeping on one side over another may exacerbate muscle imbalance, enhanced back pain, and in select cases, scoliosis, a sideways curvature of the spine. Sleeping on the same side also suspends the middle of your body between your hips and shoulders.

In order to alternate sides, you will need to change positions as you fall asleep or throughout the night. To do so without further injury, try to ‘log roll‘ into between positions. This allows your whole body to move together. Moving just the torso may cause a twisting motion that doesn’t help your spine’s alignment.

Unfortunately, stomach sleeping does not support your spine’s alignment. Studies suggest that this is the worst position for sleeping due to the unnatural position of your neck, spinal alignment, and breathing —especially true if you just had spinal surgery.

If you are a stomach-sleeper, start by lying on your side with a pillow by your stomach and then gently roll over using the pillow as a support. You are not totally on your stomach, but it does feel like it without damaging your spine.

Your Mattress Matters

If you’re still having trouble sleeping after adjusting your position, consider updating your bedroom apparel. Board-certified physical therapist Marleen Caldwell says your mattress type matters. The best mattress for back pain is a well-made innerspring, foam, or Tempur-Pedic mattress as compared to your innerspring mattress. When dealing with the devil of chronic back pain, this will allow for additional support.

“If your hips are wider than your waist, a softer mattress can accommodate the width of your pelvis and allow your spine to remain neutral,” Caldwell offers. “If your hips and waist are in a relatively straight line, a more rigid surface offers better support.”

Studies show that a medium-firm mattress is best for most people. The key is to use what is comfortable for you. If your mattress is too firm, you can add an ‘egg crate’ foam mattress pad for additional cushion. Pillows come in all shapes and sizes. Find the one that’s right for you. If you don’t know which one works for you, try them all. There’s no limitation on how many pillows you can use or try out.

Good Vibes Only

Another suggestion is to focus your attention on a specific sound. Consider adding a sound machine to your regimen, or download a sound app from your phone. Sound machines produce soothing sounds, such as music, rain, wind, highway traffic, and ocean waves mixed with—or modulated by— white noise. White noise resembles that of an air conditioner or fan. Before you know it, you feel calmer and ready to fall asleep.

While you work to perfect your sleeping etiquette by adjusting the lighting, updating your sleeping position, purchasing the best mattress for back pain, and maybe adding a sound machine, you’ll soon realize that a good night’s sleep with a bad back is possible.