Gay Slang Question: "Oh, Mary!"

I was highly amused to see that A&E Biography has an All-Mary Week scheduled next week: Hart, Kay Letourneau, Magdalene, Tyler Moore, and Queen of Scots (no they don’t have Paul Lynde or Richard Simmons scheduled). Obviously there is at least one gay man working at A&E!

Got me thinking: any gay culture historians know whence “Oh, Mary!”? It was well-known by 1970, as John Waters used it in “Mondo Trasho”—the Virgin Mary appears before Divine at a laundromat, and Divine falls to his knees and cries, “Oh, MARY!”

Why Mary? Are there rules to Marying someone?