A good night’s sleep can do wonders for exhaustion and a bad mood. But if you continually wake up feeling anything but refreshed, your mattress could be to blame. The wrong kind of support can lead to lost zzz’s and exacerbate back pain — or even cause it. But with all the options available, choosing the right mattress can be a daunting task.

With some luxury mattresses costing $4,000 or more, you may worry that you’ll have to liquidate your assets for a good night’s sleep. But experts say to rest easy on that count.

“Price and name brand do not necessarily equal quality,” notes Michael Gleiber, M.D., an orthopedic spine surgeon and a spokesperson for the American Academy of Orthopaedic Surgeons. “More expensive mattresses may not be comfortable for every person.”

With that in mind, check out our guide to mattresses and what to keep in mind when shopping for one.

The hard question: firm or soft?

“In general, soft mattresses are felt to be less than ideal for the back,” says Raj Rao, MD, a professor of orthopedic surgery and neurosurgery at the Medical College of Wisconsin in Milwaukee. However, if you sleep pain-free on a softer mattress, it’s fine to continue. “The trick is to find a mattress that's soft enough to conform to the natural curves of the spine, but firm enough to provide good support so you don’t sink down too far,” Gleiber says.

Low-back pain might seem best served by a hard mattress, but a recent study published in The Lancet found that one with medium firmness offered better support and comfort. According to the American Chiropractic Association, a mattress should support the whole body, without gaps between it and the curves of the body (which can happen with a too-firm mattress).

Don’t be seduced by the term “orthopedic.”It’s a marketing term with no standard definition, says Gleiber. Just because it’s labeled this way doesn’t mean it’s any better for people with back issues than a non-orthopedic mattress of similar construction.

Related:How to Help Your Teen Get Enough Sleep

Innerspring or memory foam?

These two constructions are the most common types on the market. One isn’t necessarily better than the other, say experts. Innerspring mattresses contain steel coils covered with padding; memory foam versions are made from polyurethane or latex foam and mold to the shape of your body. (Memory foam is generally the more expensive of the two).

Memory foam mattresses may not be as good for menopausal women or people who tend to get hot, however, judging from numerous complaints in online forums.The foam tends to hold more heat than the innerspring mattresses, which causes women who have hot flashes to kick off the covers. One solution is to look for a thin or latex topper, or to try some of the non-electric “chill pads” that have come on the market and are designed especially for women having problems with hot flashes.

Don’t even think about sleeping on a futon or waterbed, especially if you have back issues.If you still have a futon hanging around from your single days, it’s time to give it the heave-ho. “Most futons are cheaply made and don’t provide the best lumbar support,” says Gleiber. Waterbeds fall equally short, he says, noting that they’re especially inappropriate for people with conditions like chronic back pain and degenerative disc disease.

The right way to shop for a mattress

Even if you do all your shopping online, when it comes to mattresses, it’s better to try them out at a store. Talk with friends or check social media reviews to find a store with a good reputation and salespeople who are glad to answer your questions. If you feel pressured to make a quick purchase, go somewhere else.

Shop with your partner, and take your time. The Better Sleep Council recommends lying down in a variety of positions — on your back, on your side, and so on — on several mattresses so you get a sense of how firm and comfortable they feel.

It may feel a little embarrassing to lie down on a bed in public, and many people leap off a store mattress almost as soon as it touches their back.But give time. “It can take up to 15 minutes to relax enough to feel the true support of a mattress, so don’t rush it,” according to an advisory from the Better Sleep Council. “The more time you take in a store, the less likely you’ll have buyer’s remorse later on.”

Related:Block Blue Light and Sleep Better Tonight

Different support needs are common when it comes to sharing a bed, so a little creativity may be in order. If you or your partner has a lot of trouble getting comfortable, mattresses whose firmness is adjust on each side (i.e., the sleep number bed) are one way to go.

While it’s not very romantic, separate beds may be your best (and last) resort. Experts suggest placing two twin beds next to each other with two different mattresses on top. Sometimes trading a few snuggles for a good night’s sleep may be worth it.

Beware used mattresses

If you’re tempted to save money by buying a used mattress (or even finding one free online), be aware that mattresses may cost you a lot more in the long run.

The National Pest Management Association reports that buying a used mattress or box spring is risky because it may contain bedbugs, which tend to bite at night and are notoriously hard to get rid of. (Dealing with a bedbug infestation can set you back hundreds or even thousands of dollars.) The pest management association also warns of the danger of dust mites and fleas (the latter pest can remain dormant for up to a year before emerging in force).

Related:What’s Hiding in Your Mattress?

Jennifer Kelly Geddes is a New York City-based writer and editor who specializes in parenting, health and child development. She’s also the mom of two teen girls.