Bed Bath & Beyond Inc posted an unexpected rise in quarterly profit by cutting costs to offset slumping demand for home furnishings, and the retailer's shares rose more than 6 percent.

The beat really was on the expense line although they had good operating performance across the board, said Bernstein analyst Colin McGranahan, who has an outperform rating on the stock.

They have absolutely tightened the labor model up. I think they're reducing advertising costs, which had gone way up.

Net income for the fiscal first quarter ended on May 30 rose to $87.17 million, or 34 cents per share, from $76.78 million, or 30 cents per share, a year earlier, the company said on Wednesday .

Analysts on average were expecting earnings of 25 cents per share, according to Reuters Estimates, which would have meant a decline in profit compared with a year earlier.

Sales rose 2.8 percent to $1.69 billion as it opened more stores, but sales at stores open at least a year, a key retail measure known as same-store sales, fell 1.6 percent.

Selling, general and administrative expenses declined to $524.5 million in the quarter from $537.18 million a year earlier.

Bed Bath & Beyond and peers like Pier 1 Imports Inc
and Williams-Sonoma Inc have seen sales weaken as the crumbling U.S. housing market erodes demand for the home furnishings that they sell.

Bed Bath & Beyond has sought to battle the difficult environment by cutting costs and scaling back expansion plans. In the first quarter, it opened six Bed Bath & Beyond stores, one Christmas Tree Shops store, and one buybuy Baby store. It also closed one Bed Bath & Beyond store.

McGranahan said the results show Bed Bath & Beyond has gained market share since former rival Linens 'n Things closed its doors after filing for bankruptcy protection last year.

The loss of a major competitor means that Bed Bath & Beyond no longer needs to distribute as many coupons as it did in the past to get shoppers into its stores, helping to lower expenses, the analyst said.

Shares rose 6.4 percent to $30.20 after closing at $28.39 on the Nasdaq.

(Reporting by Nicole Maestri; Editing by Gary Hill)