If you sleep on your back, the main issue is neck support. “The pillow shouldn’t be too high, or it pops the head forward. Too low and you’re lying with your head back. The natural curve in the neck needs to be supported with the pillow.” And sorry, stomach-sleepers: this is not a recommended sleeping position. “It puts a lot of stress on your neck and it puts your spine into a kind of extension,” says Cohen Ackerman.

Pick your pillows

Pillows can be firm, soft or somewhere in between, but the main thing is that they should support the natural curve in your neck, no matter what position you sleep in. Some people like to use a cervical pillow, which is often made of foam with a dip or curve in it to accommodate your head and neck. A U-shaped neck pillow may be helpful for back sleepers, to keep your head from going to one side if you find that uncomfortable. Consider trying a pillow between your knees as well, says Ackerman Cohen, to help support your alignment and prevent hip or back pain. A firmer foam one in the shape of an apple core, available at some health care supply stores, may do the trick if you find a regular pillow slips out of place as you sleep. If you have shoulder pain, having a pillow supporting your arm can be helpful, or a pillow behind your shoulder to support it while sleeping on your back. Long body pillows are another popular option, she says. “Some people find those really help because they can wrap their arm over it and they can stick the bottom part between their knees.”

Reduce the motion

If you share a bed with someone, “motion transfer” is what happens when the other person is an active or restless sleeper and the resulting mattress movement jostles you, potentially causing pain or disturbing your sleep. If that’s an issue, look for a mattress that is designed to minimize motion transfer through individual coils or memory foam. Putting two extra-long twin mattresses together to form a king-size mattress without the motion is another option to consider.

Consider all angles

Some people living with arthritis like an adjustable bed and mattress, where they can raise and lower the head or foot of the bed for sleeping or to facilitate getting in and out of bed.

Check that company policy

Because you really only know if a mattress works for you if you sleep on it, consider a company that offers a trial period and a flexible return or exchange policy. When you do find a mattress and pillows that you like, invest in the proper covers to encase them, to reduce dust mites and make them easier to clean and refresh.

When it comes to picking a mattress, it comes down to personal preferences, says Cohen Ackerman. “There’s no magic recipe. It’s about finding what’s comfortable, but knowing the principles of what to look for.” Plus, the best mattress in the world won’t help if you’re not setting the stage for a good night’s sleep. Winding down, sticking to a schedule, choosing food and drink wisely and exercise all contribute to sleep quality. Make sure to check out our online guide about Overcoming Fatigue as well.