New York (CNN Business) Online reviews have replaced going to a store to lie down on a mattress. That's why Mattress Firm, America's largest bed store, has filed for bankruptcy.

The chain said it plans to remain in business, but it filed for Chapter 11 bankruptcy protection to get out of about 700 unfavorable leases. Mattress Firm said it will quickly close 200 underperforming stores and make decisions about whether to close or maintain the other 500 locations in the coming weeks. There are more than 3,300 Mattress Firm stores in the United States.

Mattress Firm plans to exit bankruptcy in about two months. It hopes that the liquidity gained from the bankruptcy allows it to expand into more favorable markets and even open some new stores in existing markets.

"We will continue to provide unmatched value to our customers by offering the best quality beds at prices that fit any budget today, tomorrow and into the future," said CEO Steve Stagner.

Its parent company, Steinhoff International, is dealing with major problems including accounting irregularities forcing its CEO to resign in December 2017.

Read More