Mattress Firm Inc., the largest U.S. specialty mattress retailer by number of stores, plans to file for bankruptcy soon, possibly within days, according to people familiar with the matter.

As part of the bankruptcy filing, a group of bondholders of Mattress Firm’s troubled parent company, Steinhoff International Holdings NV, will inject about $300 million in capital into the retailer, the people said.

Steinhoff,...