1940, "wedge-heeled shoe," from wedge (n.) + -ie. The underwear prank so called by 1970s, from the effect it gives the victim.
webster
*wed-
wed
wedding
wedge
wedgie
wedgwood
wedlock
Wednesday
wee
weed