(Reuters) - Mattress Firm Inc, the largest U.S. mattress retailer, is preparing to file for bankruptcy protection as soon as this week, as it seeks to exit costly store leases and shore up its business, people familiar with the matter said on Tuesday.

FILE PHOTO: Two Mattress Firm stores, a brand owned by Steinhoff, lie on either side of the street in Encinitas, California, U.S., January 25, 2018. REUTERS/Mike Blake/File Photo/File Photo

The Houston-based retailer, with 3,000 brick-and-mortar locations, has been squeezed by online upstarts including Casper Sleep Inc.

Mattress Firm's South African parent company, Steinhoff International Holdings NV SNHJ.J, faces its own debt challenges.

Mattress Firm and Steinhoff did not respond to multiple requests seeking comment.

Once Mattress Firm files for bankruptcy, the process is expected to be completed within a couple of months, and Mattress Firm’s vendors are expected to be repaid in full, said the sources, who asked not to be identified because they were not authorized to speak to the media on the matter.

Mattress Firm would shed some of its stores in the process, the sources said.

Steinhoff acquired Mattress Firm for $3.8 billion in 2016. Mattress Firm had acquired HMK Mattress Holdings LLC, the parent company of competitor Sleepy’s, the same year for $780 million and then rebranded the shops.

More than 20 retailers have filed bankruptcy since the beginning of 2017. Toys “R” Us Inc did not survive and liquidated, while others including children’s retailer Gymboree Corp and Payless ShoeSource Inc reorganized.

Analysts at Piper Jaffray Companies PJC.N said last summer that a bankruptcy would allow Mattress Firm to clean up its real estate portfolio and improve cash flow and profitability.

Mattress Firm lost Tempur Sealy International Inc TPX.N, the maker of mattress brand Tempur-Pedic, as a supplier last year, limiting its offerings.

Tempur Sealy’s shares rose as much as 9 percent in afterhours trading in New York on Tuesday, as investors bet it would benefit from less competition.

Steinhoff is a retail conglomerate that sells furniture, household goods and general merchandise in Europe, Africa and Australia, and it has automotive dealerships in South Africa. In July, creditors agreed to hold debt claims for three years, removing a threat of default.

Steinhoff, which has more than 40 brands that include Conforama, Mattress Firm and Poundland, has sold assets including its Polish unit Kika/Leiner and stakes in investment holding firm PSG and industrial firm KAP.