New York City doesn't sleep, and from the looks of it neither did the staff of "The Late Show with Stephen Colbert" this week.

The CBS late night show aired its fourth consecutive live show covering the Republican National Convention Thursday night. During rehearsals at New York's Ed Sullivan Theater on Thursday afternoon, a smiling Colbert looked a bit sleep deprived.

Colbert went through the hour-long rehearsal with a cup of coffee in hand, and even though he may have had some late nights this week, he would have reinforcements Thursday from an old friend whose had plenty of time to rest lately: Jon Stewart.

The former "Daily Show" host, bearded and in an FDNY ball cap, riffed jokes alongside Colbert, showrunner Chris Licht and executive producer Tom Purcell.

Stewart would even at times affectionately heckle the host from the front row.

"Where's your cable balls," Stewart yelled as Colbert was rattling off jokes.

However, Stewart, who is also an executive producer on the show, wasn't just there to poke fun at his colleague during rehearsal. The comedian was also a part of Thursday night's show.

Stewart hid behind Colbert's desk as the host made jokes about Thursday's resignation of Fox News chairman, Roger Ailes, a favorite target of both Colbert and Stewart from their Comedy Central days.

"Wish I had someone to celebrate with," Colbert said before Stewart popped out.

After Colbert and Stewart did some improvisational celebrating that included fist pumping, humping, and nipple rubbing, the former host asked Colbert if he can "talk about the election."

Colbert gave Stewart his seat behind the desk, and adorned him in a jacket and clip-on tie.

Then for roughly 10 and a half minutes, it was as if Stewart had never left the airwaves.

Stewart zipped through jokes. He would also at times stop and laugh at clips of Fox News, Republican nominee Donald Trump and Fox News host Sean Hannity (who he nicknamed "Lumpy").

Like he did for 16 years at "The Daily Show," Stewart cracked jokes at the expense of the news network using clips to show times when they contradicted themselves.

During the live telecast of the show, Stewart added some extra expletives to his take.

"I see you and I see your bulls***," Stewart said following the clips. Colbert then whispered in Stewart's ear. "Oh, we're live," Stewart said.

During rehearsal, the staff in the audience laughed and clapped for Stewart and when he finished, he told them that he can cut down the bit for time if need be.

"I got an idea, I can take out every other word," he laughs.

"Take out all the vowels," Colbert quickly retorted standing behind him.

This would be the second time this week that the two would share the live "Late Show" stage. On Monday, Colbert found Stewart hiding out in a secluded cabin alongside Colbert's "Colbert Report" persona.

Related: 'Late Show' brings back Jon Stewart and Colbert's 'Colbert Report' persona

For Colbert, the week has been in many ways one of the show's best since its debut last September.

The opening show on Monday averaged 2.6 million viewers, a boost of 36% from the prior Monday.

Then on Tuesday, the show had a big viral moment when actress, Laura Benanti, gave a speech as Melania Trump that mocked the plagiarism controversy from Monday. That moment has racked up more than 4.5 million views on YouTube.

Thursday night's show was equally exciting even though it was delayed by 45 minutes due to Trump's speech going long.

"I know you had to wait," Colbert said to the audience before the live show Thursday night. "Blame Donald Trump."

The 12:15 a.m. start time did not seem to bother the "Late Show" audience, however, which cheered Colbert throughout.

Colbert looked back at the audience, and gave a bit of a tired smile. It's been a long and successful week for the host.

But Colbert and his "Late Show" better get some sleep while they can.

They'll have to do it all over again when they cover the Democratic National Convention live next week.