When former “Crazy Ex-Girlfriend” writer Elisabeth Kiernan Averick joined the staff of “The Simpsons” a few years ago, she knew eventually she’d be called upon to write a musical episode. That episode is Sunday’s Season 33 premiere, “Star of the Backstage,” in which Marge stages a revival of her high school musical, “Y2K: The Millennium Bug.”

At first, Marge fondly remembers serving as the show’s stage manager back then. But when she decides to embark on a high school reunion of the cast and revive “Y2K,” she soon realizes that those rosy memories didn’t align with reality — that she was treated as a bit of an outcast, both back then and now. That’s when she starts to imagine what it would be like in the spotlight as a star performer. For those fantasy sequences, Kristen Bell provides Marge’s singing voice. (Scroll down to watch an exclusive clip.)

“If you have a voice like Marge, just a little bit gravelly, in your imagination, who do you want to sound like? It is Kristen Bell,” Averick said. “She has the most beautiful Disney Princess voice, and it’s light and airy and the pitch is perfect. We were lucky enough to get her.”

Coincidentally, Averick had been watching the Disney Plus unscripted series “Encore,” hosted by Bell, whose show reunites high school pals decades later to re-stage their high school theatrical productions. “That was a really fun concept to think about,” Averick said. “And because I’m now at the 20-year high school reunion mark, it felt really fun to say, OK, that’s Marge now, she’s 38. And this is what she did senior year, as stage manager.”

Lending the episode a “Crazy Ex-Girlfriend” reunion behind the scenes, Jack Dolgen, also an alum of that show, wrote the music for the episode and Kat Burns — who won two Emmys for the CW musical comedy series as choreographer — also choreographed “The Simpsons” episode.

“Having Jack Dolgen come and write the music and getting to write the lyrics with him was just really exciting, he has such a unique ear, and he’s so skilled at this kind of comedy song writing,” Averick said. “And with Kat Burns, the animators watched the choreography and made it match perfectly.”

“The Simpsons” has been known for its original music over the years, and has even done music-heavy episodes in the past, such as the Season 8 “Mary Poppins” parody “Simpsoncalifragilisticexpiala(Annoyed Grunt)cious.” But this was the rare case of an entire episode of “The Simpsons” that was written with a full musical arc.

“This was shaped as a musical from the onset,” Averick said. “And the songs come from an emotional place. Because if you can’t speak, you sing, and then if the emotion gets too high, you dance. ‘The Simpsons’ has always loved to do music, and they do it so well and so funny. But this was the first time that we were like, ‘there’s going to be plot in these songs, and it’s going to move the story forward.’”

Lazy loaded image

The episode includes around seven songs, including one from the “Y2K” musical-within-a-musical. Averick said there wasn’t time to write more music for “Y2K,” but the one that they did, “5-4-3-2000,” is a “Seasons of Love” (from “Rent”) sendup. “That’s really all we had time for,” she said.

Also guest starring in the episode, as the Springfield High alum who left for Broadway and returns home to reprise her “Y2K” lead is Sarah Chase (“Unbreakable Kimmy Schmidt”). Chase’s character immediately fits right back in with her former castmates, making Marge feel like even more of an outcast.

“I went to college with Sarah,” Averick said. “I’ve always always loved her voice but she also was so funny. The fact that we have Kristen and Sarah who can both [sing and be comedic] was really lucky.”

Executive producer Matt Selman, meanwhile, knows that “The Simpsons” fans who are caught up in the show’s every-changing timeline canon may once again be thrown off by the fact that Homer and Marge were teenagers in 2000, when the show actually began in 1989.

“I hope this episode makes the fans who canonized Homer and Marge being in their teens in the ’90s angry, the way like generation before that, that people that were angry that Homer and Marge were teens in the ’80s,” he said. “They’ve been teens in every decade, and everyone’s angry that we’ve rewritten it.”

Considering “The Simpsons” has been on television for more than three decades, Selman said the show’s writers continue to challenge themselves to find new twists on storytelling.

“If you’re doing episodes that don’t feel at least a little bit new, or like you’re trying something different, it’s boring,” he said. “You want each show to have a unique identity. It’s one of our main goals is give each episode a big idea, a big visual thing, a big emotion, a big character thing.”

“Star of the Backstage” is among the first episodes to have been written during the early days of COVID-19 lockdown, and producing this ambitious episode remotely was a challenge.

“It was an unbelievable amount of work,” Selman said. “Remote recording, this musical that has eight different people in all the different parts. And none of them are ever singing together. Getting the actors into the headspace of what the heck is going on was a huge amount of production work for Elizabeth and Jack.”

As for COVID making an appearance, or even being referenced on “The Simpsons,” Selman said it wasn’t considered. “It’s sort of hard to incorporate,” he said. “People don’t want to see animated characters with masks or not masks or fighting over masks. We get to create a little bit of an alternate reality.”

As for “Star of the Backstage,” the producers are still determining how and when the music might be available to stream or download. But Selman also has a dream of the show’s long-term impact: “My fantasy is that a high school would put on this episode of ‘The Simpsons’ as their high school play,” he said.

Below, an exclusive clip from “Star of the Backstage,” as well as some posters created for the episode, parodying top Broadway plays.

Lazy loaded image
“The Simpsons” does “The Music Man” Fox
Lazy loaded image
“The Simpsons” does “Rent” Fox
Lazy loaded image
“The Simpsons” does “Chicago” Fox
Lazy loaded image
“The Simpsons” does “Wicked” Fox