I've come across this claim in several places, from readings in my undergrad about "topsy turvy" holiday traditions like Carnivale, to more popularly oriented documentaries like the Christmas special of Tudor Monastery Farm. They argue that yearly traditions where the lowly were briefly elevated in status and expected to act irreverant were medieval society's way of safely releasing a little bit of the socio-economic tension that was present the other days of the year.
The thing is, I don't know of any medieval people themselves claiming this, and I know that the study of the premodrn past is often fraught with incorrect conclusions that draw on our modern biases, so I'm wondering whether there are any medieval people who described these practices like we do, or how we have come to this "safety valve" conclusion an dhow we can be sure this conclusion isn't colored by modern biases?
The "safety valve" explanation is a variant of structural functionalism, as developed by Émile Durkheim and Marcel Mauss, inter alia. I'm not a sociologist, but I can give a vulgarized definition (actual sociologists, or historians steeped in sociological theory, please step in): cultural practices ultimately function as social stabilizers. The problem, as you've noted, is that a functionalist explanation need not be corroborated by explicit contemporary testimony. It's not so much a matter of what people thought or said, but the subconscious motivations underlying what they did. Structural functionalism approaches human society as a complex organism that has adapted various self-sustaining cultural practices; these can be observed and studied objectively, as one would study any biological organism. There is a tremendous amount of subtlety to this, however, and it gets especially murky when sociological theory is applied to the distant past. An excellent (if dated) introduction to this problem is Sherry Ortner's article "Theory in Anthropology since the Sixties," which examines the influence of sociological thought on cultural anthropology -- both disciplines that have had a profound impact on historical method in the past half century. It's available for free here.
To take a relatively recent (okay, mid-90s) and widely acclaimed example, David Nirenberg's Communities of Violence has applied this kind of thinking to violence against minorities in late medieval Aragon and southern France, arguing that both "cyclic" and "cataclysmic" instances of violence (e.g. Easter stonings, pogroms) served to negotiate underlying social tensions. Structural functionalist arguments tend to break down a teleological reading of history, pointing instead to fundamental self-regulatory mechanisms (structures) that may take different cultural forms depending on the historical situation. Every cultural practice can be 'read' as a stabilizing ritual: Carnival is not an incipient expression of widespread anticlericalism that leads inevitably to the Reformation, but a highly ritualized and historically specific mechanism for managing the social tensions that have accrued throughout the year. One could say, I suppose, that functionalist explanations are inevitably colored by modern biases, as they seek to describe underlying social mechanisms that are necessarily transhistorical and escape the notice of contemporaries. The challenge for the sociologically-minded historian is explaining change on the structural level. If culture is just a means of stabilizing the underlying structures of society, how do structures change? How do we get capitalism, nation-states, world wars?