Green’s Dictionary of Slang

murphy n.2

[? stereotyping of an Irish person as foolish or risible]

(US campus) a condition of having one’s underwear caught between the buttocks; thus have a murphy.

[US] P. Munro Sl. U.
[US]J. Algeo Fifty Years Among the New Words (1993) 241: 1990 Fall. Wedgy appears to be a term for a high-school prank [...] Connie Eble reports the synonyms melvin and murphy.