Breaking tension during filming with outrageous pranks and gags is a Hollywood tradition – and “Modern Family” star ED O’NEILL just made the history books!

In an episode where his character’s suffering a bout of depression, he locks himself in his bedroom and refuses to come out as his distraught family stands outside, begging him to let them in.

Said my source, Onda Settalot: “Finally, Ed relents and they all go trooping in – SOFIA VERGARA, JULIE BOWEN, TY BURRELL, JESSE TYLER FERGUSON, ERIC STONESTREET – expecting, per the script, to find him huddled under the bed covers.

Instead – thanks to a big assist from wardrobe and makeup – Ed’s posed seductively on the bed in a sexy gold dress, sporting a bright red wig, spider lace black stockings, spike heels, makeup to make MARILYN MONROE jealous, and huge black eyelashes!

Everyone was supposed to look sad as hell – but their faces froze in shock!

After a split second of silence, they just went loopy – giggling and screaming like crazy!” A few hysterical moments later, Ed left ’em laughing and stumbled off in his heels to wash off the girly-gunk and shoot the scene as written!