New York CNN Business  — 

After taking Mattress Firm into and out of bankruptcy, the company’s CEO is stepping down.

The brand said Wednesday that its board has accepted the resignation of Steve Stagner, who started his latest stint as chief executive in March 2018. He spent decades at the company before then.

The leadership shakeup follows a difficult time for the brand, which has been struggling to compete with online retailers like Casper and Amazon (AMZN). The company also over-expanded by acquiring the Sleepy’s retail chain in 2015.

In October, Mattress Firm filed for Chapter 11 bankruptcy protection to get out of about 700 unfavorable leases. It exited bankruptcy almost two months later, as planned.

Mattress Firm’s parent company, Steinhoff International, has also been troubled. In 2017, its CEO resigned in the wake of accounting problems.

01 Mattress Firm FILE

Mattress Firm is hoping that its smaller store footprint — about 2,600 nationally as of November, compared to roughly 3,300 at the time it filed for bankruptcy — and more liquidity will help it turn things around.

“Steve’s leadership has been critical through this period where we needed to return the business to positive momentum,” the company’s board said Wednesday. Stagner said that “now is the right time to leave Mattress Firm and make way for fresh leadership,” adding that he will spend more time with his family after a “busy year.”

During this leadership transition, the board plans to work with remaining management to execute a growth strategy, Mattress Firm said in a statement.

Stagner spent 23 years at the company, and served as CEO from 2010 to 2016. That year, he became executive chairman and chairman of the board of directors, and handed the CEO reigns to Ken Murphy. In 2018, Stagner took them back. At the time, the company said that the decision reflected “the need for a singular voice of leadership” as it moves forward.

– CNN Business’ Nathaniel Meyersohn and Jordan Valinsky contributed to this report.