Pranks were a feature of ancient seasonal festivals. During Saturnalia, a Roman winter celebration, participants would dance, drink and play jokes on each other; slaves pretended to rule their masters, and a mock king, the Lord of Misrule, reigned for a day. Later, court jesters took advantage of a similar inversion of roles, playing tricks on kings and courtiers. Medieval magicians and tricksters had their own bible, the 14th century “Secretum Philosophorum” (which taught, for instance, how to turn water into wine by soaking pieces of bread in dark wine, drying them in the sun, and dropping them into the jug when no one was looking).
(Source: the Economist)