1726, "morbid longing to return to one's home or native country, severe homesickness considered as a disease," Modern Latin, coined 1688 in a dissertation on the topic at the University of Basel by scholar Johannes Hofer (1669-1752) as a rendering of German heimweh "homesickness" (for which see home + woe).
From Greek algos "pain, grief, distress" (see -algia) + nostos "homecoming," from neomai "to reach some place, escape, return, get home," from PIE *nes- "to return safely home" (cognate with Old Norse nest "food for a journey," Sanskrit nasate "approaches, joins," German genesen "to recover," Gothic ganisan "to heal," Old English genesen "to recover"). French nostalgie is in French army medical manuals by 1754.
Originally in reference to the Swiss and said to be peculiar to them and often fatal, whether by its own action or in combination with wounds or disease.
[Dr. Scheuzer] had said that the air enclosed in the bodies of his countrymen, being in Æquilibrium with a rare and light air that surrounds them, was overloaded in lower countries with an air more dense and heavier, which compressing and obstructing the capillary vessels, makes the circulation slow and difficult, and occasions many sad symptoms. [Account of the publication of "Areographia Helvetiæ" in New Memoirs of Literature, London, March 1726]
By 1830s the word was used of any intense homesickness: that of sailors, convicts, African slaves. "The bagpipes produced the same effects sometimes in the Scotch regiments while serving abroad" [Penny Magazine," Nov. 14, 1840]. It is listed among the "endemic diseases" in the "Cyclopaedia of Practical Medicine" [London, 1833, edited by three M.D.s], which defines it as "The concourse of depressing symptoms which sometimes arise in persons who are absent from their native country, when they are seized with a longing desire of returning to their home and friends and the scenes their youth ...."
It was a military medical diagnosis principally, and was considered a serious medical problem by the North in the American Civil War:
In the first two years of the war, there were reported 2588 cases of nostalgia, and 13 deaths from this cause. These numbers scarcely express the real extent to which nostalgia influenced the sickness and mortality of the army. To the depressing influence of home-sickness must be attributed the fatal result in many cases which might otherwise have terminated favorably. ["Sanitary Memoirs of the War," U.S. Sanitary Commission, N.Y.: 1867]
Transferred sense (the main modern one) of "wistful yearning for the past" is recorded by 1920, perhaps from such use of nostalgie in French literature. The longing for a distant place also necessarily involves a separation in time.
1857 as the years of someone's life between 90 and 99; from 1848 as the tenth decade of years in a given century; 1849 with reference to Fahrenheit temperature. See ninety.
Many still live who remember those days; if the old men cannot tell you the exact date, they will say: 'It were in the nineties;' (etc.) [Chambers's Journal, Nov. 1, 1856]
Related: Ninetyish "characteristic of the (eighteen-) nineties" (1909). In Britain, the naughty nineties was a popular name 1920s-30s for the 1890s, based on the notion of a relaxing of morality and mood in contrast to earlier Victorian times. In U.S., gay nineties in reference to the same decade is attested from 1927, and was the title of a regular nostalgia feature in "Life" magazine about that time.
The long, dreary blue-law Sunday afternoons were periods of the Nineties which no amount of rosy retrospect will ever be able to recall as gay, especially to a normal healthy boy to whom all activities were taboo except G. A. Henty and the bound volumes of Leslie's Weekly of the Civil War. [Life magazine, Sept. 1, 1927]