The Season 3 episode, "Original Cast Album: Co-op," is a loving tribute to D.A. Pennebaker's 1970 film, "Original Cast Album: Company."

When it came to casting the Elaine Stritch role for “Co-Op,” the upcoming Season 3 episode of IFC’s “Documentary Now!” that parodies D.A. Pennebaker’s 1970 film “Original Cast Album: Company,” Seth Meyers and John Mulaney could think of no one better to fill Stritch’s stockings than veteran “Saturday Night Live” writer Paula Pell.

“If you knew Paula, she would have been your first choice,” Meyers said after a recent DOC NYC preview screening of “Original Cast Album: Co-op.” Meyers, an executive producer of “Documentary Now,” wrote the episode with Mulaney, who also stars as a persnickety composer Simon Sawyer. Dressed in a black turtleneck and smoking throughout, the character is based on Stephen Sondheim, the legendary musical theater composer who wrote “Company.”

The duo briefly entertained asking Sondheim to play Simon Sawyer, but said they’d be thrilled if he just watched the episode. “The dream is for Sondheim to see it, right? That’s Mulaney’s dream,” said Meyers. Pennebaker piped in from his seat in the audience: “That would be an interesting moment. He’d like it too, I’m telling you he’d love it.”

The episode includes a number of surprisingly rousing Sondheim riffs. Renée Elise Goldsberry (“Hamilton,” “The Good Wife”) pulls focus with “My Home Court,” a song about decorating an apartment with tennis memorabilia that includes the unnervingly catchy refrain “and the brown and the beige and the brown and the beige.” It reads like a lost number from “Sunday in the Park with George.” Sondheim’s ode to neurotic New Yorkers “(Not) Getting Married Today” becomes “Cocaine Tonight,” the uptempo verse building to: “I did a little cocaine tonight.” As a befuddled doorman at the co-op, Richard Kind sings “Doorman Tips.”

Quad Cinema

“You get down to time pretty quickly and so you have to cut things,” said Meyers. That meant some gems didn’t make the cut for the 21-minute episode, including a “You Could Drive a Person Crazy”-type number about ordering Chinese food. “It was basically like one person on the phone and a lot of people yelling out what they wanted,” Meyers said.

As lyricists, Meyers and Mulaney recorded their ideas as voice memos that they sent to composer Eli Bolin (Mike Pettry did the orchestrations). “I could only come up with pure Sondheim soundalikes. Not soundalikes, copies. Plagiarism. Melodic plagiarism,” said Mulaney. “So I would go ‘Okay, this one is ‘Something Just Broke’ from ‘Assassins,’ and I need you to change the melody.’ And I would do a voice memo with my dog barking in the background, he would write an entirely new piece.” (Mel Brooks had a similar songwriting process when he adapted “The Producers” for Broadway.)

They drew mostly from the Pennebaker film for the episode’s dramatic beats, but added a twist from “The Best Worst Thing That Ever Could Have Happened.” Released in 2016, the film follows the ill-fated 1981 Broadway run of Sondheim’s “Merrily We Roll Along,” and shows the cast recording an album after learning their show has been cancelled and they’re all out of jobs. “They did indeed have to record their cast album the day that the show closed. Yes. Which we thought was funny, but you all just sighed at,” said Mulaney.

Best known for comedy, Mulaney also has an impressive songwriting career. While writing for “SNL,” he received multiple Emmy nominations and one win for Outstanding Music and Lyrics. He also sings occasionally on Netflix’s animated comedy “Big Mouth.” While his love of musical theater is well documented, he sees another reason why “Original Cast Album: Company” strikes a chord with comedy writers.

“I think we could all relate to being with people we love at four in the morning, maybe wanting to kill them,” he said. “And people offering pointers like ‘sung,’ or the comedy equivalent, ‘this would be good if it was funny,’ or something like that.”

“Documentary Now!” Season 3 premieres on IFC February 20.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.