Sleep disorders aren’t exactly uncommon.

The National Institute of Neurological Disorders and Stroke estimates that about 40 million people in the United States suffer from long-term sleep disorders, while 20 million suffer from occasional issues.

Many sleep issues are affected by the way we sleep. Poor positioning can easily result in joint pain, muscle fatigue, and restlessness, limiting the restorative power of our sleep cycles. Here’s what you can do tonight to get better sleep (and wake up in less pain).

Back pain is a fairly common occurrence.

Your goal is to avoid putting too much strain on your back for the 6-8 hours you’re asleep every night. To that end, you should try to avoid sleeping on your stomach, since this can irritate your back muscles and spine.

Instead, sleep on your back with a pillow under your legs. If you sleep on your side, a pillow between your legs can help to restore your hips to a neutral position, limiting back pain. You should also make sure that you’re exercising and stretching your back regularly; talk to your physician if your back pain persists.

Shoulder pain and neck pain can also be treated with pillow positioning.

If you have shoulder pain, try hugging a pillow as you fall asleep. You should also try to avoid sleeping on a side—sleeping on your back might feel unnatural at first, but it’s less likely to affect your shoulders for obvious reasons.

If you have neck pain, make sure you’ve got a decent pillow. Look for a firm pillow that provides plenty of support.

Have trouble falling asleep?

Insomnia is a common sleep disorder, but it’s usually easy to treat. First, avoid caffeine and other stimulants before bed. Make sure you go to bed at around the same time every evening and avoid using electronic devices in bed. In fact, your bed should be just for sleeping—your body will train itself to associate bedtime with sleep, and you’ll drift off much easier.

If you still have trouble falling asleep, get up and do something else for a while, but don’t toss and turn, as this can be counterproductive. Don’t keep any clocks near your bed, either, as this can heighten anxiety as you focus on the minutes ticking away.

Snoring is another common disturbance.

It’s often a sign of potentially serious sleep disorders like sleep apnea, so you may need to set up a sleep study. If you’re overweight, losing weight may reduce your snoring.

You should also avoid drinking alcohol before bedtime, and you may be able to prop your head up higher to give your body room to breathe (literally).

Acid reflux can be a painful issue.

If you’re waking up due to acid reflux, check your diet; make sure you’re drinking enough water, and avoid spicy or acidic foods before bedtime. Medication can be extraordinarily effective, so talk to your doctor about options.

While changing your sleep position won’t treat all types of acid reflux, it can be helpful; sleep on your left side and elevate the top part of your body with pillows to try to reduce the effect.