At Walmart, Best Buy, or Whole Foods, the listed price on any item is usually what you pay. You might be able to get a discount with a coupon, but asking store employees for a discount generally won't work.

But not every industry works like this. Haggling is common in expensive industries, like car and jewelry sales. Because customers don't participate in these markets very often, there's less incentive to win customer loyalty with fair and transparent pricing, and more opportunities to dupe unsophisticated buyers into overpaying.

Or take the mattress industry. It's notorious for inflated prices, confusing branding, and gimmicks that trick consumers into overpaying.

Yet underpaying for a mattress can also be a big problem. After all, most people spend about eight hours per day — that's a third of their life — sleeping. And a good mattress will last a decade or more. So it's worth investing in a mattress that will help you wake up well rested every morning.

So how do you buy a mattress that will help you get a good night's sleep without getting ripped off? Read on for details.

Knowledge is power

Mattress salespeople's power comes from the fact that they know what a fair price is for each mattress and you don't. Many mattress stores invent hugely inflated "standard" retail prices and then offer "discounts" that still price the mattress way above its actual cost. Department stores are particularly notorious for this.

For example, a price tag might claim that a mattress normally costs $3,000 but is currently available for 60 percent off at $1,200. In reality, no one ever pays $3,000; $1,200 is the regular price. And if you negotiate effectively, you'll be able to get it for hundreds of dollars less.

As with any negotiation, the key to getting a better deal is to demonstrate that you know the product's real value and won't pay more. The easiest way to do that is by playing brick-and-mortar stores against online ones.

Once you find a mattress you like at a brick-and-mortar mattress store, use your favorite search engine to find the lowest price for that same mattress from an internet retailer. If you have a smartphone, you might be able to do this right in the store, though it might make sense to go home, do your research on a PC, and then go back to the store.

Once you know the best price offered by competitors, ask the salesperson to beat it. He or she might say no, in which case you can go to another store or just order online. But most stores will agree to match the price.

Mattress stores make price comparisons unnecessarily difficult

Of course, the mattress industry hates this kind of comparison shopping. To discourage it, some mattress manufacturers will give the same mattress different names in different stores.

For example, the popular Simmons Beautyrest line has different brand names at different stores. The "Beautyrest Recharge Allie" at Macy's is called the "Beautyrest Recharge Devonwood Luxury" at Sears, the "Recharge Signature Select Hartfield" at Mattress Firm, and the "Beautyrest Recharge Lyric Luxury" at US-Mattress.com. If customers don't realize these are names for the same mattress, it's harder for them to bargain effectively.

Fortunately, this kind of obfuscation isn't too hard to overcome. Often you'll be able to find charts online that tell you exactly which mattress models are equivalent. Otherwise, you should be able to figure it out by comparing features. US-Mattress.com, for example, says that the Beautyrest Recharge Lyric Luxury has 1 1/4 inches of AirFeel foam, an inch of AirCool foam, a half inch of GelTouch foam, one inch of energy foam, 476 "800-series" coils, and so forth. Ask your brick-and-mortar store for this kind of information on the mattress you want, and then find prices for similar mattresses from online retailers.

Make sure the store has a good return policy

One thing that makes mattress shopping hard is that there's no fast, foolproof way to tell if a particular mattress is going to be comfortable. The only way to be sure is to spend a lot of time on it.

Experts recommend setting aside several hours for mattress shopping. Bring a book to the mattress store and spend about 15 minutes lying on each bed.

mattress salespeople's power comes from the fact that they know what a fair price is for each mattress and you don't

But even a leisurely in-store evaluation period won't guarantee that it will be comfortable for a full night's sleep. So you want to make sure that you can return a mattress if it proves less comfortable in your bedroom than it seemed in the store.

Stores' return policies differ dramatically. Many charge hefty fees. Some charge as much as half the price of the original mattress to swap it out for a new one. So before you agree to buy a mattress, make sure you understand its return policy.

Totally free returns are fairly rare, because it costs money to send a truck to retrieve the old mattress and bring a new one. But if a company charges high fees for returning a mattress, that's a reason to call around to see if another store will offer a more generous return policy.

Mattresses also come with separate warranties provided by the manufacturer. These generally range from 5 to 20 years. Longer warranties may be a sign of quality, but don't put too much stock into warranties longer than 10 years, since it's a good practice to replace your mattress after a decade of use.

Consider buying a "bed in a box"

We don't think of the mattress industry as a hotbed of innovation, but the last two years have seen the emergence of a new generation of direct-to-customer mattress companies. The most famous of these companies is Casper, but it faces competition from Tuft and Needle and Leesa.

These companies are all based on the same basic idea: they sell mattresses made of foam that can be compressed enough to fit in a box the size of a dorm fridge. That lowers shipping costs and makes it easier to get the bed into tight spaces. Once removed from the box, the mattress expands to its full size.

You might think a mattress that expands from a box wouldn't be very comfortable, but reviews so far have been generally positive. These mattresses use materials similar to those found in high-end memory foam beds that can cost thousands of dollars through conventional retail channels.

Casper and Leesa charge around $850 for a queen-size mattress. Tuft and Needle is even cheaper at $600. And because the companies sell their product directly to consumers via the web, there's no haggling.

To entice customers to give the mattress a try, Casper and its rivals have introduced another innovation: a free, no-hassle return policy. All three companies let you try their mattresses for free for 100 days, and then return them if you're not satisfied.

The big downside with these companies is a limited selection. Each company sells just one model (though it's available in a variety of sizes). All three companies have targeted the middle of the firmness scale. That means if you prefer a mattress that is particularly firm, or particularly soft, these products won't be a good option.

Also, some people find conventional coil mattresses more comfortable than high-tech memory foam ones. These mattresses do not come in a box the way foam mattresses do, though there is at least one online-only retailer that sells them.

Read more