What’s bad for Bed, Bath & Beyond could be good news for other retailers. Bed Bath & Beyond warned last week that it is running out of cash and is considering filing for bankruptcy protection . The home-goods retailer is preparing to file for Chapter 11 within weeks, according to the Wall Street Journal . “It appears BBBY’s hopes of a turnaround story are diminishing,” UBS analyst Michael Lasser said in a note Friday. Doubts about the company’s future and reports of a bankruptcy filing “leaves an opportunity for other retailers to pick up further share,” he added. Walmart and Target stand to gain the most market share from Bed Bath & Beyond, Lasser said. They both have significant overlap with their product offerings and geography — 79% of Bed Bath & Beyond stores have at least one Walmart within a 10-minute drive, and 77% have at least one Target, according to UBS. WMT 1Y mountain Walmart’s one-year performance Walmart could see 35-40 basis points (0.35-0.40 percentage point) of incremental, comparable growth at its core U.S. business this year if all Bed, Bath & Beyond and Buy Buy Baby stores were to close and Walmart was to potentially capture 25% of its addressable share, Lasser said. Buy Buy Baby is owned by Bed, Bath & Beyond. If additional sales came in at a 25% contribution margin, it would imply 2% to 3% earnings-per-share accretion. For Target, the same outcome would contribute 125 basis points to 150 basis points of incremental comparable growth, translating to 5% to 10% of EPS accretion, he said. TGT 1Y mountain Target’s one-year performance The two dominant retailers aren’t the only potential beneficiaries. Dollar stores, warehouse clubs and department stores are also among rival chains that could take share, according to UBS. “With this 3Q’22 pre-release, BBBY noted its net sales declined -33% over last year, suggesting that this movement of share is already occurring,” Lasser said. Sleep Number is among retailers who could see an uptick in demand from consumers shopping for mattresses and bedding. Some 59% of Bed, Bath & Beyond stores have a Sleep Number location within 10 minutes, according to UBS. Privately-held Mattress Firm should also see a boost. HomeGoods, owned by TJX , competes with Bed, Bath & Beyond in home furnishings, kitchen products and other accessories. It has stores a short distance from about 60% of Bed, Bath & Beyond stores. Costco and Walmart’s Sam’s Club also stand to benefit. Costco recently reported a 7% year-over-year increase in net sales for December and was named to Evercore ISI’s “fab five” list . Some 40% of Bed, Bath & Beyond stores have a Costco within a 10-minute drive, while 43% have a Sam’s Club. — CNBC’s Michael Bloom contributed reporting.