When I moved to Kentucky, I bought a gently used mattress and box spring to sleep on. I didn't bother buying a new mattress, or even buying a bed frame -- it was just a temporary fix until I was more settled.

That was more than six years ago. I'm still sleeping on that damn bed.

Read more: Finding the best mattress online: 11 top brands compared

Suffice it to say that I'm long past due for an upgrade -- and a better night's sleep -- but where to start? The mattress industry has seen some dramatic changes since the last time I was on the market, and aggressive branding and gimmicky-sounding designs can make it tough to tell which mattresses are worth it and which mattresses aren't.

Even more impactful: The rise of online, direct-to-consumer mattress sellers has all but upended the retail landscape. Competition is a good thing, but it can make it difficult to feel confident that you're getting the best deal on a good night's sleep.

Before buying anything, I wanted to talk to mattress experts and get a better sense of how to shop smart -- here's what I learned.

Ry Crist/CNET

Online sales: Game changer or shortcut?

If you listen to podcasts, watch TV or use the internet, then there's an extremely good chance that you've been inundated with ads for online, direct-to-consumer mattress sellers. They've been around for less than a decade, but they've already had a huge impact on the mattress industry, often undercutting the show-floor sticker shock with modern-looking, budget-friendly designs.

"In general, you get a pretty good mattress for the price," says Jack Mitcham, founder of the mattress review site mattressnerd.com. A former salesman in a mattress store, Mitcham notes some key differences between buying a mattress online and buying one in-store. "I think people tend to be a little bit happier because there's less second guessing," he says, referencing a concept called the paradox of choice. "You don't go through that when you buy online. You haven't seen those 80 other options, and that doubt doesn't creep into your mind."

Many online sellers also offer generous trial periods and return policies -- sleep on your new mattress for a few months, then donate it in exchange for a full refund if you aren't satisfied. That helps mitigate the fact that you typically can't test any of these mattresses out before buying them like you can at a mattress store.

Mitcham also points out that the number of online sellers has surged from just a handful of options a few years ago to over a hundred. "I don't think all of them are going to be around in, say, three years," he says. "Now, let's say your mattress has a warranty issue, it starts sagging or something four years from now. Will your company still be around to service it?"

Mitcham suspects that the more established names -- Casper, Leesa, Tuft & Needle, what have you -- aren't going anywhere, but he isn't so sure about a lot of the new startups. His advice: Make sure the brand you're buying from has a proven track record in the industry. The more years they've successfully stayed in business, the better.

Get smart about materials

Terry Cralle, a registered nurse and co-founder of a sleep clinic that tests for disorders such as sleep apnea and insomnia, says that your mattress will obviously make a huge impact on the quality of your nightly rest. "It can really make or break a good night's sleep," she says, adding that people's preferences will depend on their body type, and typically evolve over time.

"Older people, their skin is thinner," she says. "They have less of that subcutaneous fat in their body, so they might want a softer surface."

Cralle points out that mattresses are evolving, too, so she suggests keeping an open mind towards a variety of different kinds of materials, including ones you might not have tried in a while.

"The technology is really moving at a rapid pace," she says, describing some of the new ways that manufacturers are experimenting with how they layer different materials within their mattresses. "Some people really like a memory foam layer on top, some people like latex. Some people just want to stick with the springs."

CertiPUR-US

Foams are increasingly common these days, and the quality and makeup will vary from model to model. A good start is to look for mattresses that carry the seal of CertiPUR, a nonprofit industry organization that tests foam mattresses for things like mercury, lead and formaldehyde.

For memory foam, Mitcham recommends keeping an eye on the density of the material, and not going any lower than 3 pounds per cubic foot. (Some sellers list specs like these online -- if you're shopping in-store, you might need to ask a salesperson if they can look them up for you.) "If you have a layer that's like 2.8 or 2.5 pounds per cubic foot, it's probably not going to be as durable and it'll be more likely to lose its comfort in a few years," he says. For the high-resiliency foam often found in the base of the mattress, Mitcham recommends staying at 1.8 pounds per cubic foot or higher.

"Some really cheap mattresses, like some of the Chinese mattresses on Amazon might be 1.5, and that's too low," he says.

"The density is your durability," agrees Brent Limer, chief sales officer at Latexco, a manufacturer of both memory foam and latex mattresses. He also points out that memory foam density won't necessarily dictate how comfortable it is. "Polyurethane foams are a chemical reaction, so you can change the feel by adjusting your formulation and keeping the same density."

Memory foam tends to retain heat a little more than other materials, so many will offer special coatings or additives that promise to cool things down a bit. If you're concerned about heat, Limer also suggests looking for foams that have a more open cell structure. Finding them doesn't require a microscope or a chemistry set -- just press your hand into the foam, then see how long the mattress takes to recover its shape when you pull it away. "The ones with a more open structure will typically have a 3- to 5-second recovery, versus like a 10-second recovery," Limer says.

Put reviews into perspective

Reading reviews from other customers is always a good idea when you're shopping online, but it's important to put those reviews in context when you're buying a mattress. Stray complaints about firmness or softness should be taken with a grain of salt -- after all, a mattress that's too firm for one person could be too soft for another. More important is focusing on each customer's buying experience, and getting a sense of how the company you're thinking of buying from will treat you. (To that end, a close read of each company's warranty, return and haul-away policies is also a good idea.)

Beyond your fellow customers, you'll find no shortage of buying advice from mattress review websites and YouTube videos, and much of it is indeed pretty helpful. That said, it's also important to understand that many of these sites make the bulk of their money through affiliate referral links, which means that the people writing the reviews are often getting kickbacks direct from the manufacturer each time someone buys a mattress based off of their recommendations. In other words, the more they turn readers into buyers, the more money they make -- and according to reports, some are making millions.

That isn't wrong in and of itself. CNET makes money off of affiliate referrals, too -- though I'd point out that the compensation goes to the site and not directly into the pockets of writers like me.

At any rate, it's something worth keeping in mind as you seek out advice. If a site seems more focused on pushing a particular brand than offering helpful, practical buying guidance, harbor an extra dose of skepticism. Sticking with sites that are clear and upfront about any affiliate referral practices is a good start -- finding ones that explicitly state which brands are participating is even better.

Enlarge Image Ry Crist/CNET

Don't rule out retail

"The only way to know what kind of mattress you like is to go and feel them," points out Mary Helen Rogers, a spokeswoman for a group of mattress industry leaders called the Better Sleep Council. Even if you ultimately buy something online, she says, your local retailer can still serve as a good starting point.

"The main thing is to spend a lot of time with the mattresses and use the salesperson as a resource, but don't be used by them," Mitcham advises. "Don't just do everything the salesperson says and follow their process, which is tailored to get you to buy what they want you to buy."

On his site, Mitcham notes that customers shouldn't be afraid to shoo the salesperson away and lie down on each mattress they're considering for as long as needed. If you're having trouble deciding, Mitcham writes, look for the mattress you can lie down on the longest without tossing or turning.

Bottom line: With online, direct-to-consumer mattress sales booming, the stores know that they have to work harder than ever to earn your business, which gives you a lot more leverage than you might expect. Markup is typically higher than you'll find online, but there are still deals to be found -- and unlike most online sellers, brick-and-mortar retailers will often leave room for negotiation and price matching.

"I actually had customers go to Sears or something and put a 10 percent deposit down on a mattress," Mitcham told me of his years in retail. "Then they'd bring me the invoice and say, 'I want you to beat this price, and I'll call up and cancel this order.' If you're willing to go to that extent then you're likely to get a deal."

As for me, I haven't finished zeroing in on the best mattress just yet (and hey, after six years, I can't exactly claim to be in a rush). The important thing is to take enough time to understand what you're paying for, especially since you'll spend more time using your mattress than any other piece of furniture in your home. Do some homework, figure out what you really prefer, and you'll have an easier time of it than you might think.