Although we now associate nostalgia with fond memory, the word was coined to refer to an unwanted medical condition. The –algia in nostalgia means “pain”; a product of New Latin, it can be found in more clinical-sounding words such as glossalgia (pain in the tongue), cranialgia (a fancy word for headache), and proctalgia (a literal pain in the behind).
Johannes Hofer (1669–1752) was a Swiss physician who named the condition, which he identified as a mania tied to homesickness in Swiss mercenary soldiers. The nost- in nostalgia means “homecoming,” and such sentimental yearning for home during field operations was viewed as a disorder of the brain, with symptoms ranging from melancholy and malnutrition to brain fever and hallucinations. —Mirriam-Webster.com