In 1905, McCay came up with the idea for Little Nemo in Slumberland in which a little boy named Nemo would have fantastical dreams ending with his awakening in the last panel. Nemo would become McCay's most popular strip lasting from 1905 to 1914 and again from 1924 to 1926. McCay's longest-running strip would be one with no recurring characters but also with fantastical element. Dreams of the Rarebit Fiend began in 1904 and the premise was simple: a collection of random people would have a bad dream caused by eating Welsh rarebit. The last panel would have the person wake up promising not to eat rarebit again. The strip ended in 1913 but was revived in 1923 as Rarebit Reveries which lasted until 1925.
Rarebit Fiend inspired McCay to test out animation and McCay wound up creating four short cartoons taken from the strip including How a Mosquito Operates and The Pet.
McCay focused mostly on animation after the 1920s until July 26, 1934 when he complained to his wife, Maude, of a headache. McCay discovered that his right arm--his drawing arm--was paralyzed, collapsed, and was pronounced dead of a cerebral hemorrhage later that day.
In 1906, Edwin S. Porter produced a seven-minute live-action adaptation of Dream of the Rarebit Fiend: