The musicals of Stephen Sondheim often struggled at the box office during his lifetime, but since his death several have become huge hits on Broadway.Stephen Sondheim, the great musical theater composer and lyricist, was widely acclaimed as a genius, but during his lifetime he had a bumpy track record at the box office, with many of his shows losing money.In death, however, his shows have flourished.A revival of “Merrily We Roll Along” — which was so unpopular when it debuted in 1981 that it closed 12 days after opening — is now the hottest ticket on Broadway. A lavish revival of “Sweeney Todd” that opened in March is already profitable, and at a time when almost everything new on Broadway is failing.Meanwhile, Sondheim’s unfinished and existentialist final work, “Here We Are,” is now the longest-running show in the brief history of the Shed, a performing arts center in Hudson Yards on Manhattan’s West Side, where luminaries like Steven Spielberg and Lin-Manuel Miranda signed up as producers to make sure no expense was spared on the Sondheim send-off.“There just seems to be an unbounded appetite for him,” said Alex Poots, the artistic director of the Shed.The posthumous Sondheim bump appears to have resulted from a confluence of factors.The big Broadway revivals feature fan-favorite talent — the “Merrily” cast includes Daniel Radcliffe of “Harry Potter” fame, while “Sweeney” is led by the celebrated baritone Josh Groban — reflecting a desire by top-tier entertainers to champion, and tackle, Sondheim’s tricky but rewarding work.The revival of “Merrily We Roll Along,” with, from left, Lindsay Mendez, Daniel Radcliffe and Jonathan Groff, is one of the hottest tickets on Broadway.Sara Krulwich/The New York TimesAlso: The outpouring of praise for Sondheim upon his death, when he was hailed as a transformational creative force, seems to have spurred new interest in his work. And his shows, some of which felt challenging when they first appeared, are now more familiar, thanks to decades of stage productions and film adaptations. Plus, according to most critics, the current revivals are good.“Sondheim went from being too avant-garde to being a sure bet, like you’re doing ‘A Christmas Carol’,” said Danny Feldman, the producing artistic director of Pasadena Playhouse, a Southern California nonprofit that won this year’s Regional Theater Tony Award. The playhouse devoted the first half of 2023 to Sondheim: A production of “Sunday in the Park With George,” a show once seen as esoteric, became one its best-selling musicals ever, and a production of “A Little Night Music” was not far behind. “The interest was shocking,” Feldman said.One side effect of his popularity: Ticket prices are high. “Merrily” is facing strong demand from Sondheim lovers and Radcliffe fans, but its capacity is limited; it is playing in a theater with just 966 seats. That has made it the most expensive ticket on Broadway, with an average ticket price of $250 and a top ticket price of $649 during the week that ended Dec. 17. “Sweeney” is also pricey, with tickets that same week averaging $175 and topping out at $399. (Both shows offer lower-priced tickets, particularly after the holidays.)“We shouldn’t be criticized for being a hit and paying back investors who have taken a big punt in New York,” said the “Merrily” lead producer, Sonia Friedman. “Most shows right now are not working, and therefore when something comes along that does, let’s get the investors some money back.”In life, Sondheim was often seen as more of an artistic success than a commercial one — a critical darling with a passionate but finite fan base, leading to short runs for many of the shows whose scores he composed, especially during their first productions. A few shows, particularly “A Funny Thing Happened on the Way to the Forum,” were hits from the start, but some musicals that are now viewed as masterpieces, including “Sweeney Todd” and “Sunday in the Park With George,” did not recoup their costs during their original productions.“It’s not like he fell out of favor and has been rediscovered. He’s always been revered and valued and prized by everybody who loves theater, but we also have to recognize that several of his shows, when they first premiered, were not understood and were not embraced,” said Jordan Roth, the producer who brought “Into the Woods” back to Broadway in the summer of 2022, seven months after Sondheim’s death. Now, Roth said, “The grip on our hearts seems to have tightened.”“Into the Woods,” a modestly scaled production, featured the pop singer Sara Bareilles and a troupe of Broadway stars. It recouped its costs and then had a five-month national tour.The original production of “Sweeney Todd” did not recoup its investment, but the current revival starring Josh Groban and Annaleigh Ashford is making a profit.Sara Krulwich/The New York TimesIn February, seven weeks after “Into the Woods” concluded on Broadway, “Sweeney Todd” began previews. It’s a much bigger production — big cast, big orchestra — that was capitalized for up to $14.5 million. It has sold strongly from the get-go (during the week that ended Dec. 10, it grossed $1.8 million) and has already recouped its capitalization costs.“I’m sorry that I can’t call him and say look at these grosses. He definitely would have had a sarcastic statement in response, but he would have liked it secretly,” said the show’s lead producer, Jeffrey Seller. “Who doesn’t want to be affirmed by the audience?”Groban and his co-star Annaleigh Ashford are ending their runs in the show on Jan. 14; the show’s success has prompted the producers to extend the run, with Aaron Tveit and Sutton Foster taking over the lead roles on Feb. 9.“It has morphed into being under the umbrella of an enormous and deserved celebration of Sondheim’s work and legacy and life,” Groban said. “All of a sudden there’s grief involved, and wanting to do him proud, and what-would-Steve-do feelings.”“Merrily,” which began previews in September, is the biggest turnabout, given that its original production is one of Broadway’s most storied flops. The current revival, capitalized for up to $13 million, has been selling out.“Of all the things he wanted, he wanted as many people as possible to be in the theater watching the shows, and he just missed it,” said Maria Friedman, the director of the “Merrily” revival and a longtime Sondheim collaborator.In November, 10 members of the company of the original ill-fated “Merrily” attended the revival and marveled at the reversal of fortunes.“It’s thrilling to see the show finally get its due,” said Gary Stevens, who was an 18-year-old in the original “Merrily” ensemble, and who is now 60 and works an executive at a chauffeuring company in Florida. “I’d be remiss if I didn’t say there was a sense of bittersweetness. We look at this revival’s success as, in some ways, our success, because the day after closing, even with how exhausted we were and how sad we were, we recorded a kick-ass album that kept that show alive, so that it became a legendary flop and cult classic that kept going and going, and now this.”Another member of the original “Merrily” cast, the actress and singer Liz Callaway, was nominated this year for a Grammy Award for a live album of Sondheim songs, one of two collections of Sondheim songs nominated in the 2024 Best Traditional Pop Vocal Album category. “I think a new generation is falling in love with Sondheim now,” she said.“Here We Are” is a little different. It is not expected to recoup its costs, or to transfer to Broadway, but both the leadership of the Shed and the commercial producer who raised money to finance the production proclaimed it a success.“It was always about honoring Steve’s legacy,” said the producer, Tom Kirdahy. “And we hope that it has another life, in London or on the road.”In London, there are also two Sondheim shows running. “Old Friends,” a revue of Sondheim songs with a cast led by Bernadette Peters and Lea Salonga, is in the West End. And at the Menier Chocolate Factory, a revival of Sondheim’s rarely staged “Pacific Overtures” opened earlier this month to critical praise.“For those of us who wanted to do right by him, this is a year I’ll never forget,” Groban said. “I just hope he’s smiling down.” More