David and "Friends" actress Courteney Cox stripped down to their swimwear for the scene, and were joined by Jesse and actor Eric Stonestreet for the moment.
Speaking with guest host Sean Hayes during an appearance on "The Ellen DeGeneres Show" to be broadcast on Friday, February 28 about how the cameo appearance came to be, the 44-year-old actor revealed he was "kind of comfortable" with the set-up after first meeting the pair back in 2017.
"I was very excited... I kind of knew David Beckham a little bit earlier. Let me explain," he said. "I ran into him and his wife, Victoria Beckham, ever heard of her?".
"(We were) outside of a SoulCycle class and they were like, 'We're huge fans of the show.' And I was like, 'Well if you ever want to come visit the set, take my number.' So I was texting with Victoria Beckham later that day and she was like, 'We would like to come tomorrow'."
Jesse explained he "hosted" the pair onset when they came to visit and, after striking up a friendship, he added, "So I was already kind of comfortable around David in the hot tub."
While "Modern Family" is set to end after its 11th and final season later this year, Jesse is set to be busy after announcing he and his husband Justin Mikita are to become first-time dads in July.