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: