I'm glad you asked such an interesting question. Let's “dig” for an answer!
It seems that back in the 17th century, a certain Herr Doktor Hofer was in the employ of one of the princely states of lower Bavaria, upon which it was frequently incumbent, following the custom of that century, to enlist such soldiers of fortune and mercenary powers as were required to secure its defense. Unfortunately the Swiss recruits who composed the better part of these ad hoc militias were susceptible to a malady that took the fight right out of them: If they heard a certain variety of sound, especially, it was said, the lowing of a particular breed of cow, they were straight away inconsolable, and whether making camp, or in the thick of combat, or investing a city, they dropped their weapons and headed back to Switzerland like a shot. Dr. Hofer's diagnosis: “nostalgia.”
The word is compounded from the Greek nostos, meaning backwards, and algia, as we see it in neuralgia; that is, discomfort, or pain. Hofer made up the word and defined it and wrote it all up in a big book, Dissertatio Medica de Nostalgia oder Heimwehe, in 1688.
According to Hofer a person can only be cured by going home and if they don't they will die immediately.