Jesse Tyler Ferguson, Eric Stonestreet, Ty Burrell, and Julie Bowen played a funny little prank on their sleeping Modern Family costar Sofia Vergara Credit: Courtesy of Jesse Tyler Ferguson

Never let your guard down around a bunch of goofy sitcom actors! Sofia Vergara learned that lesson the hard way when she fell asleep during a shoot with her Modern Family costars at the Mandalay Bay Resort & Casino in Las Vegas on Monday, Jan. 20.

The Colombian-born beauty, 41, was just trying to catch a little shut-eye between scenes. But her brief catnap proved to be the perfect opportunity for her fellow cast members to have some fun at her expense.

The fun started when Jesse Tyler Ferguson (who plays Mitchell on the hit series) posted a photo of the SAG-nominated actress asleep in a chair with a tissue covering her face. "Sofia napping. 1," he captioned the Instagram shot.

A few minutes later, he shared another picture -- this one titled "Sofia napping. 2." It showed Ferguson hamming it up for the camera while perched on the arm of the chair above a still-sleeping Vergara.

Ty Burrell (Phil) -- who won the Screen Actors Guild Award for Male Actor in a Comedy Series on Saturday, Jan. 18 -- got in on the action, too.

As did Ferguson's onscreen partner Eric Stonestreet (Cam).

The funniest "Sofia napping" photobomb, however, arguably came courtesy of Julie Bowen, who plays Claire on the Emmy-winning sitcom. Bowen spoofed Vergara by posing next to her unsuspecting costar with a napkin over her own face.

Vergara, for her part, took the prank in stride. She even reposted the photos from Ferguson on her WhoSay account. "Never take a little nap around [these] people again!!!" she quipped.