It's Always Sunny in Philadelphia took a classic scene from Seinfeld and expertly recreated it. Frank is George, Dee is Elaine, Mac and Dennis are both Jerry, and Charlie is Kramer in the awesome scene, which is from the episode entitled The Contest, from the fourth season of Seinfeld. The episode is all about masturbation, but never ever mentions the word. Instead, the cast uses a number of euphemisms, which strangely enough, earned Larry David an Emmy for Outstanding Individual Achievement in Writing in a Comedy Series.
During It's Always Sunny in Philadelphia's version of a clip show, the cast included their homage to the iconic Seinfeld episode and it's ridiculously detailed. A clever Redditor was able to take both scenes and play them side by side, which shows that the Always Sunny crew only falls behind in pacing for a little bit. The way that they characters pull off even the smallest nuances from the original episode is very impressive, which ends with Charlie's Kramer busting into the apartment to announce that he's out of the contest.
In the Seinfeld episode, Jerry, George, Elaine, and Kramer hold a contest to see who can go for the longest time without masturbating, which was a result of George's mother catching him in the act. They each put up $100, except Elaine, who puts in $150. Kramer is the first to go out after watching a naked woman from the building across the street, which is the scene that It's Always Sunny in Philadelphia took on. In the end, it's never revealed who won the contest, but it was between Jerry and George.
The Contest was written by Larry David, and based off of a real event from his life. David ended up winning the contest, and thought that it would make for a great storyline on Seinfeld. However, the comedian took some time to approach Jerry Seinfeld about the idea out of fear that he'd reject the pitch. However, Seinfeld loved the idea and didn't see it as offensive, so work began on finishing the script. The cast and crew were not given the script until the night before the first table reading.
Larry David's first pass at the script included the word masturbation, which the studio did not like, so Jerry Seinfeld and David removed it and came up with other ways to describe the act. The show has since been hailed as one of the best episodes of Seinfeld in its nine seasons and introduced "master of my domain" into popular culture. As for It's Always Sunny in Philadelphia, picking that scene must have been a no-brainer for the crew, who can be seen nearly breaking character when Charlie's Kramer announces that he's out of the contest, much like the original version of the episode. You can watch the scenes side by side over at Reddit and then check out the scenes separately below.