I believe that in addition to being a popular turn-of-phrase, “turn the world upside down,” is a deep and enduring cultural meme that is demonstrably traceable back to ritual agrarian festivals---which were, themselves, a transformation of ancient hunter-gatherer rituals of ecstasy and catharsis---such as Saturnalia, Carnival, Samhain, Mardi Gras, Feast of Fools, the Season of Misrule, etc., which enacted a temporary reversal or dislocation of the social and sexual status quo.
The Season of Misrule is a descendent of Saturnalia, the Roman festival of the winter solstice. Somehow coming back around to the sunny side of our orbit suggested the inversion of social structures to the Ancient Ones. Turn the hourglass over, reach the limit and do an about-face; I suppose that’s more or less the logic, if logic has any role in this season of Unreason. see, Anna Castle
Twelfth Night (Wikipedia) a festival, in some branches of Christianity marking the coming of the Epiphany. Different traditions mark the date of Twelfth Night on either 5th January or 6th January; the Church of England, Mother Church of the Anglican Communion, celebrates Twelfth Night on the 5th and "refers to the night before Epiphany, the day when the nativity story tells us that the three wise men visited the infant Jesus."
In medieval and Tudor England, the Twelfth Night marked the end of a winter festival that started on All Hallows Eve — now more commonly known as Halloween. The Lord of Misrule symbolizes the world turning upside down. On this day the King and all those who were high would become the peasants and vice versa. At the beginning of the Twelfth Night festival, a cake that contained a bean was eaten. The person who found the bean would rule the feast. Midnight signaled the end of his rule and the world would return to normal. The common theme was that the normal order of things was reversed. This Lord of Misrule tradition dates back to pre-Christian European festivals such as the Celtic festival of Samhain and the Ancient Roman festival of Saturnalia. see, Wikipedia
Saturnalia was an ancient Roman festival in honor of the deity Saturn, held on 17 December of the Julian calendar and later expanded with festivities through to 23 December. The holiday was celebrated with a sacrifice at the Temple of Saturn, in the Roman Forum, and a public banquet, followed by private gift-giving, continual partying, and a carnival atmosphere that overturned Roman social norms: gambling was permitted, and masters provided table service for their slaves. The poet Catullus called it "the best of days."
In Roman mythology, Saturn was an agricultural deity who was said to have reigned over the world in the Golden Age, when humans enjoyed the spontaneous bounty of the earth without labor in a state of innocence. The revelries of Saturnalia were supposed to reflect the conditions of the lost mythical age, not all of them desirable. The Greek equivalent was the Kronia.
The popularity of Saturnalia continued into the third and fourth centuries AD, and as the Roman Empire came under Christian rule, some of its customs have influenced the seasonal celebrations surrounding Christmas and the New Year. see, Wikipedia [emphasis added].