Jimmy Kimmel Jimmy Kimmel

When Jimmy Kimmel decided to pull a prank on Twitter during Sunday night's 64th Annual Primetime Emmy Awards, Tracy Morgan didn't hesitate to help out. Actually, he was more than willing: He suggested taking his shirt off for the bit — something Kimmel (probably wisely) decided to nix.

Morgan wasn't the only one who quickly answered Kimmel's call for help with this year's awards show. Stars from Girls' Lena Dunham and Breaking Bad's Aaron Paul to singer Josh Groban and the reality emcees who butchered the Emmys as hosts five years ago all went beyond the call of duty. Jimmy Kimmel Live! co-head writers Molly McNearney (who in her spare time is also Kimmel's fiancée) and Gary Greenberg gave TV Guide Magazine some exclusive tidbits on how this year's Emmy laughs came together.

Tracy Morgan threw out the script. Kimmel wanted to find a way to punk Twitter users who weren't watching the show, "and there's no one better to do that with than Tracy Morgan," McNearney says. "He's game for anything. So Jimmy called him up and asked him if he would pretend to be dead on stage." The idea was to ask viewers to then Tweet, "OMG, Tracy Morgan just passed out on the Emmys. Turn ABC on now!"

The wild card: Morgan wound up completely ad-libbing his part of the stunt. "We were going to write some lines for Tracy, and in rehearsal we realized that everything that comes out of his mouth is pure gold," McNearney says. "Nothing that we could write for him would be as good as the things that come out of his mouth."

Presenters Connie Britton and Hayden Panettiere didn't know that Morgan would be lying on stage next to them. "I think Connie and Hayden were great coming out and playing off it," McNearney says. "They had no idea that Tracy Morgan's lifeless body would be in their way as they went out to present an award." Meanwhile, Morgan kept so in character that he remained on stage, with his eyes closed, during a commercial break. "We were afraid he might have actually passed out, or was taking a nap," says Greenberg.

Lena Dunham shot the opening sketch in the nude. The entire opener was shot on Saturday, the day before the awards show, in about two hours. Kimmel and crew took advantage of Emmy rehearsals, grabbing the actresses to film in an actual Nokia Theatre restroom. As for the five 2008 Emmy hosts — reality TV's Jeff Probst, Ryan Seacrest, Tom Bergeron, Heidi Klum and Howie Mandel — consider this their penance for what is still considered one of the biggest mistakes in Emmy history. "Jimmy emailed those guys personally and asked them if they would do it, and they were great with that joke," McNearney says. "They all showed up together and were laughing about it."

The original plan would have had Zooey Deschanel, Christina Hendricks, Mindy Kaling, Kathy Bates, Connie Britton, Julia Louis-Dreyfus and Martha Plimpton wearing their dresses, "but that is a very complicated process, as we quickly discovered some of those women had not made decisions on their dresses the day before," says McNearney. "So we made it easier and more comfortable for them by putting everybody in bathrobes."

Well, everybody except Dunham, who was seen eating cake in a bathroom stall — in the nude. And yes, that's how she shot it. "God love her, she really is an angel on earth," McNearney says. "It was her idea to be completely naked. She might be an exhibitionist. We offered her a [flesh-colored] bra to wear, which is typically what you do in these situations, but she was like, 'No, I don't need it. It will be easier for you to blur if you don't have to blur around a bra strap.' I think she's pretty experienced in nudity on TV, so she knew how to do it."

The Breaking Bad Show gag was actually shot at the same spot as the real Andy Griffith Show opener. Kimmel came up with the idea of imagining Breaking Bad's Bryan Cranston and Aaron Paul existing in the pleasant, black-and-white world of Andy Griffith. The actors, complete in Breaking Bad hazmat gear, traced almost the exact same footsteps at Los Angeles' Franklin Canyon where Andy Griffith and Ron Howard shot the original credits to The Andy Griffith Show. Cranston even brought along a buddy of his who's a professional Don Knotts impersonator. "Bryan Cranston knows a guy who's a Don Knotts lookalike and suggested him," McNearney says. Adds Greenberg: "He has an entire reel of himself playing Don Knotts on different things."

Paul was so eager to do the bit that he flew in from London to shoot the clip and then turned around and flew back to the U.K. "He's such a great guy for doing that for us," McNearney says.

Kimmel's parents did not know they'd be kicked out of the theater. After losing the outstanding variety show category, Kimmel went on stage and jokingly chastised his parents for giving him too rosy of an outlook on life. Security then yanked them out of the theater (they were quietly guided back to their seats later). "They had no idea that was coming," McNearney says of her future in-laws. "We wanted to make sure that did not get out, and they did not know that was happening. And they were genuinely surprised." McNearney notes that Kimmel also once kicked his mom out of the Jimmy Kimmel Live! audience for talking with a friend throughout his monologue.

Josh Groban was game to sing One Direction. Greenberg says it was a "Herculean task" to find the best clips of Kimmel's career to play during the mock "In Memoriam" segment about the talk show host's life, including old footage from Win Ben Stein's Money and The Man Show. "As we were watching we got kind of sad, as it actually gave you the feeling that Jimmy had passed away." It worked: McNearney says Kimmel's mom teared up in the audience. As for Groban, the singer quickly signed on for the gag, and a writer suggested he perform a slowed-down version of One Direction's "What Makes You Beautiful." Says Greenberg: "I have a 13-year-old daughter and it's one of her favorite songs. It's just one of those great sappy teen songs that when you slow it down, it's perfect for this kind of thing."

McNearney says a few jokes had to be cut for time toward the end of the show, but that it timed out perfectly. "[Jimmy] was really wanting to be as involved in the show as he could be," she says. "He didn't want to be a host that came out at the open and disappeared until the end." That being said, it's tough to squeeze content into a telecast with 26 major awards to pass out. "All those people deserve that moment but yeah, it starts to drag, and that's tough," she says. "[Executive producer] Don Mischer did tell us that it's harder to get laughs later in the show." Kimmel got a lot of advice from Mischer, as well as past hosts like Garry Shandling. "I think he felt very supported by his writers and by the team here," she adds.

There's no rest for the Kimmel team: Jimmy Kimmel Live! next travels to Brooklyn for a series of October shows.

Subscribe to TV Guide Magazine now!