This is 100% legit and really did happen.
Dancing mania (also known as dancing plague, choreomania, St. John's Dance, tarantism and St. Vitus' Dance) was a social phenomenon that occurred primarily in mainland Europe between the 14th and 17th centuries. It involved groups of people dancing erratically, sometimes thousands at a time. The mania affected adults and children who danced until they collapsed from exhaustion and injuries. One of the first major outbreaks was in Aachen, in the Holy Roman Empire (in modern-day Germany), in 1374, and it quickly spread throughout Europe; one particularly notable outbreak occurred in Strasbourg in 1518 in Alsace, also in the Holy Roman Empire (now France).
Affecting thousands of people across several centuries, dancing mania was not an isolated event, and was well documented in contemporary reports. It was nevertheless poorly understood, and remedies were based on guesswork. Often musicians accompanied dancers, due to a belief that music would treat the mania, but this tactic sometimes backfired by encouraging more to join in. There is no consensus among modern-day scholars as to the cause of dancing mania.
The several theories proposed range from religious cults being behind the processions to people dancing to relieve themselves of stress and put the poverty of the period out of their minds. It is speculated to have been a mass psychogenic illness, in which physical symptoms with no known physical cause are observed to affect a group of people, as a form of social influence.[1
It is certain that many participants of dancing mania were psychologically disturbed,: 136 but it is also likely that some took part out of fear, or simply wished to copy everyone else.: 43 Sources agree that dancing mania was one of the earliest-recorded forms of mass hysteria,: 135 : 73 and describe it as a "psychic epidemic", with numerous explanations that might account for the behaviour of the dancers.: 43 It has been suggested that the outbreaks may have been due to cultural contagion triggered, in times of particular hardship, by deeply rooted popular beliefs in the region regarding angry spirits capable of inflicting a "dancing curse" to punish their victims.