Rebecca Bunch, the heroine of US television’s most critically acclaimed new comedy, Crazy Ex-Girlfriend, seems to have it all. She’s a high-achieving lawyer at a big-name Manhattan law firm – ordered, orderly, in control. Then one day a chance meeting with a long-lost love, Josh, causes her to quit her job and move across the country to the small town of West Covina, California.

Or as Rebecca, played by the show’s creator Rachel Bloom, puts it in the full song-and-dance number that accompanies that decision: “In my soul I feel a fire, cause I’m heading for the pride of the inland empire. My life’s about to change … oh my gosh! Cos I’m hopelessly in love with … West Covina, California.”

Nor is that moment, which pays detailed homage to the classic Broadway musical, a one-off. Over the course of its inventive first season, Crazy Ex-Girlfriend, currently available on Netflix in the UK, races through musical theatre history, making reference to everything from Gypsy, Stephen Sondheim’s classic of thwarted ambition, to the more gentle modern favourite Once. As Megan Garber wrote in The Atlantic, “it’s a musical [but] it’s musical criticism too… a story not just with a heart… but with a brain.” It’s also placed musical theatre back in the spotlight – and it is not alone.

For the musical has been having something of a moment. First, there was Matt Stone and Trey Parker’s irreverent The Book of Mormon, which both poked fun at Broadway conventions and honoured them. Then came Lin-Manuel Miranda’s all-conquering Hamilton, which uses rap and hip-hop to tell the story of the founding fathers. In Britain, Tim Minchin gave us one of the best new shows of recent years in Matilda and hopes this summer to repeat that feat when his adaptation of Groundhog Day opens at the Old Vic.

At the age of 86, Sondheim himself is also working on a new musical with a book from Venus in Fur playwright David Ives. Based on two Luis Buñuel films – The Exterminating Angel and The Discreet Charm of the Bourgeoisie – it is tentatively titled All Together Now and will eventually go into workshop at New York’s Public Theater, where Hamilton made its debut.

Hollywood has also been quick to get in on the act – in April the Coen Brothers’ most recent movie, Hail, Caesar!, paid dizzy tribute to, among other things, the great On the Town, and this December will see the release of La La Land, Damien Chazelle’s romantic ode to the MGM musicals of the 1950s, starring Ryan Gosling and Emma Stone.

Facebook Twitter Pinterest Emma Stone and Ryan Gosling step out in La La Land. Photograph: Lionsgate

Meanwhile, a musical based on the songs of the Pogues is also in the works, and being developed by the unlikely trio of The Wire’s David Simon, his wife, author Laura Lippman, and fellow crime writer George Pelecanos.

“What you’re seeing is two different things, both of which are fuelling the musical’s popularity,” says Ben Brantley, chief theatre critic of the New York Times. “On one hand a show like Crazy Ex-Girlfriend comes from the longer tradition of The Producers, Book of Mormon, Avenue Q, Baz Luhrmann’s Moulin Rouge and even Glee – they’re pastiches of the musical form that both satirise and embrace the old conventions. They embrace them sincerely with an ironic smile. Then you have Hamilton – and that’s something quite different. It’s the first musical since the heyday of the genre to take the music that people listen to at home and integrate it seamlessly into the story on stage. It makes you rethink what the musical can do.”

Certainly there’s no doubting that Miranda’s smart, sharp, multi-Tony-award-winning retelling of the life of the man on the $10 bill, from his Caribbean childhood in St Kitts and Nevis to his untimely death in New York’s Greenwich Village after a duel, is reaching parts other musicals can only dream of, thanks to its inventive combination of thoroughly modern music and a good old-fashioned tale of ambition, jealousy, desire and despair.

It’s Amadeus by way of The West Wing, with unstoppably hummable tunes thrown in. Small wonder that in the US tickets change hands for upwards of $1,000. In the UK there’s already a waiting list, even though the show won’t arrive here until the autumn of next year and the Grammy-award-laden cast album is already a global hit.

“Hamilton is definitely a game-changer,” says Mark Shenton, associate editor of the Stage. “The way it tells the story, from the music to the diverse cast playing the founding fathers, is thrilling. Its success raises all kinds of possibilities – it tells people that you no longer have to be safe to be successful. You can take risks and get rewards.”

Yet for all that things currently look rosy, Shenton warns that there is a huge difference between the health of the musical in Broadway and that in the West End. “Unless something is a tried-and-tested hit like Book of Mormon or Hamilton, then British producers are shy of committing,” he says. “The West End is coming off three big musical losses, Mrs Henderson Presents, Bend It Like Beckham and just now The Go-Between, so the musical may be back in fashion but it’s also high-risk.

Facebook Twitter Pinterest Rebel Wilson, Simon Lipkin, Oliver Tompsett and Siubhan Harrison in Guys and Dolls at the Phoenix theatre, London. Photograph: David M. Benett/Getty Images

“Even revivals don’t run as long as they used to – Guys and Dolls is doing well, but they’ve had to parachute in a bit of stunt casting in the shape of Rebel Wilson. That said, I have high hopes for Groundhog Day, because it’s an inspired idea and Tim Minchin is one of our brightest talents.”

It is true, too, that while the success of Hamilton is introducing new players to the game, for many the song remains the same. “I have so many complex reactions to Hamilton,” says writer, composer and lyricist Michael R Jackson, whose first musical, the semi-autobiographical A Strange Loop, was recently staged in Manhattan. “From a craft standpoint Lin-Manuel is bridging the gap between two forms he loves deeply, hip-hop and musical theatre, and using one to feed into the other, and that will provide a long-term model for what can be possible, but I also think it’s worth noting that any time there’s a story featuring black and brown bodies it’s nearly always a period piece.

“One of the reasons I’ve worked so hard on A Strange Loop is that it’s a very contemporary story – these are the stories of people you know and see, your friends and co-workers. There’s no reason musical theatre can’t tell these tales – the question is, do producers want to produce them?”

Despite these doubts, Jackson agrees that musical theatre is healthier than it has been for some time: “We’re definitely seeing a new wave of work that is showcasing diverse voices and bodies on both stage and screen.”

And the fact that Hamilton isn’t alone in flying the flag for musical theatre suggests something bigger is occurring both on stage and off. In these difficult times it seems the musicals’ penchant for escapism and fantasy holds more appeal. Certainly Crazy Ex-Girlfriend has endless compassion for its boundary-free heroine in both her crush-driven, song-singing highs and her vodka-swilling, career-imploding lows, and so, crucially, do we.

Brantley says: “One of the great things about Crazy Ex-Girlfriend is that it takes that idea of the interior fantasy where you’re walking down the street to a soundtrack of fantastic music, dancing and walking and singing, to its most happily demented extreme. There’s something hugely appealing about that, which is why people respond to the show – don’t we all have those fantasies at heart?”