The Astros are back in the World Series—and down 1–0, after Tuesday’s loss to Atlanta—which means that Houston consumers in need of a mattress upgrade once more have an exciting opportunity before them. If Houston wins the series, any Gallery Furniture customer who bought a new mattress for at least $3,000 before the beginning of game one will have the costs covered by owner Jim “Mattress Mack” McIngvale, the avatar of the city’s business community. 

Such promotions are central to the Mattress Mack brand. He’s given away free mattresses to celebrate World Series, Super Bowls, NBA Finals, Kentucky Derbys, and several other sporting events. And if you’ve been wondering how he can afford to give away all of those mattresses, we finally understand the answer. Mattress Mack bets what’s known in the business as a crap-ton of money on the outcome of the events, using the sales from his mattress promotions as a hedge against potential losses, so whatever the outcome, Mack comes out a winner.

Here’s how it works, according to an interview McIngvale gave to the gambling publication Thoroughbred Daily News: As you can see from the bet slips Mack posted on Twitter, he bet $3 million on the Astros to win at ten-to-one odds, plus another $350,000 when the club was an even longer shot to take it all, through Caesars, FanDuel, DraftKings, and theScore. Add it all up, and Mack’s $3.35 million in bets could net him $35.6 million in winnings. If the Astros win, as long as he isn’t giving away $35.6 million worth of mattresses, he comes away making a profit. If the ’Stros lose it, then as long as the new customers the promotion brought in purchase at least $3.35 million worth of mattresses, he’s also still a winner. In other words, any number of mattresses sold with an overall value between $3.35 million and $35.6 million make Mack a winner. 

According to sports-betting site the Action Network, Mack’s promotion brought in $5.9 million in gross mattress sales over the weekend, and his total liability at this point is in “the mid 20-millions.” That’s a sweet spot for the businessman, as it means a significant payout on either side of the equation. (It also means that taking a buyout worth $5.5 million, as FanDuel offered on his $1 million bet, isn’t an option—he needs the full amount in order to ensure he doesn’t lose money on the bet or the promotion.) 

The mechanics of Mack’s bets are fascinating, especially when you consider the publicity they generate for Gallery Furniture: if he wins, Mattress Mack will have won the single largest payout in the history of American sports betting! But they also reinforce the extent to which things we think of as ordinary business practices can resemble gambling. Mack’s use of legal online sports books to guarantee that he doesn’t take a bath on the free mattress promotion is innovative, but in practice, it’s not that different from an insurance policy. (According to the Action Network, no insurance company will cover this promotion.) Either way, it’s a cool way to further tie Gallery Furniture into the fabric of the Houston community. 

In a way, Mack is also inviting customers to stake bets and sweat out the results alongside him. If Houston wins, so does Mattress Mack and everyone who purchased a mattress under the promotion; if the Astros lose, well, at least customers get to keep the mattress. Now we understand exactly how he can afford to give away all those free mattresses—and also how, win or lose, Mattress Mack can sleep easy.