Struggling specialty mattress maker Tempur-Pedic (TPX) inked a deal on Thursday to acquire rival Sealy (ZZ) for $242 million and by agreeing to assume approximately $750 million in debt.

The transaction is worth $2.33 a share, representing a scant premium of just 3% on Sealy’s Wednesday close of $2.14. However, the price is 23% above Sealy’s 30-day average closing price.

The deal marries companies that have a combined yearly pro forma adjusted Ebitda of $504 million and a footprint in more than 80 countries.

“Tempur-Pedic and Sealy together will have products for almost every consumer preference and price point, distribution through all key channels, in-house expertise on most key bedding technologies, and a world-class research and development team,” Tempur-Pedic CEO Mark Sarvary said in a statement.

Based in Trinity, N.C., Sealy has roots back to the late 1800s and its brands include Sealy Posturepedic and Stearns & Foster. The company employs more than 4,200 people and generated $1.23 billion in annual revenue.

By comparison, Lexington, Ky.-based Tempur-Pedic was founded in 1992 and posted $1.42 billion in annual sales.

“The complementary product and market fit of these two companies deliver a unique opportunity to create the first full spectrum, global bedding company that addresses all market segments and consumer preferences,” Sealy CEO Larry Rogers said.

Tempur-Pedic said it has agreed to assume or repay all of Sealy’s outstanding convertible and non-convertible debt. When debt is included the total value of the deal rises to $1.3 billion.

Tempur-Pedic also said it expects the deal to add to its bottom line in the first full year of operations, but declined to specify by how much. The companies see the combination creating annual cost synergies above $40 million

Shareholders owning about 51% of Sealy’s outstanding common stock have already signed a written consent signing off on the deal, meaning no additional shareholder approvals are required. The transaction is still subject to regulatory approval.

After the deal closes, which is expected to happen during the first half of next year, the two companies will operate independently with both CEOs remaining in place.

Shares of Tempur-Pedic, which have tumbled about 50% so far this year, soared 15.50% to $30.90 despite the fact that acquiring companies usually see their shares dip after M&A announcements.

The gains outperformed those of Sealy, which saw its shares rise 4.21% to $2.23.

Bank of America Merrill Lynch (BAC) advised Tempur-Pedic on the transaction, while Sealy’s lead banker was Citigroup (C).

Follow Matt Egan on Twitter @MattMEgan5