In 2008, you probably felt an urge to sell every stock and just stuff your nest-egg cash into your mattress. In 2009, you might want to invest in the mattress maker instead.

I'm talking about high-end bedroom expert Tempur-Pedic International (NYSE:TPX), which managed to beat expectations with this week's fourth-quarter report -- staying profitable and generating cash even as other high-end retail businesses floundered

It isn't easy selling high-priced luxury goods when the average consumer is pinching pennies, but Tempur-Pedic's done exactly that. Adjusted earnings came in at $0.17 per share. That's well below the $0.52 per share reported a year ago, but still impressive, given that sales shrank by 35% year over year to $189 million. Lesser lights would fade under that pressure, but Tempur-Pedic's best-of-class margins give the company some protection from the ravages of nervous shoppers:

Company

Operating

Net

Tempur-Pedic

17.1%

9.5%

Sealy (NYSE:ZZ)

7.7%

(0.2%)

Select Comfort (NASDAQ:SCSS)

(2.1%)

(1.6%)

Data from SEC filings and Capital IQ, a division of Standard & Poor's.

When fellow Fool James Brumley reported on Sealy's icy-cold quarter a couple of days ago, he doubted that any mattress maker could prosper under these conditions. Tempur-Pedic isn't exactly thriving, but business is doing all right enough to survive.

CEO Mark Savary is on the ball, too. "We enter 2009 in a strong financial position," Savary said, backed up by a record of positive cash flows and manageable debt levels. "We have a strong brand and a strong business and we're working on a series of constant growth initiatives".

The stock is up 37% today as I write this, but still isn't up to its high of $8.09 per share in the past month, let alone the $26 it sold for a year ago. In a market flooded with deep-discount values, this one is looking mighty cushy. Those nice, springy margins should see Tempur-Pedic through the worst of this recession, and position the company for renewed growth and profits on the other side.

Further Foolishness:

Fool contributor Anders Bylund holds no position in any of the companies discussed here. Being Swedish and all, you might expect him to luxuriate in cushy foam every night, but his own mattress is a basic off-brand spring-coil model. And his La-Z-Boy couch is in for repairs. La-Z-Boy is a Motley Fool Income Investor pick. Try any of our Foolish newsletters today, free for 30 days. You can check out Anders' holdings or a concise bio if you like, and The Motley Fool is investors writing for investors.