The Man in the Moon Stayed Up Too Late
The Man in the Moon Stayed Up Too Late is the imagined original ditty that is recorded in 'our time' as the simplified nursery rhyme "Hey Diddle Diddle". The supposed original was invented (by back formation) by J. R. R. Tolkien. The title of this version is given in The Adventures of Tom Bombadil.
In the Inn at Bree ("At the Sign of the Prancing Pony", The Fellowship of the Ring Chapter 9) Frodo jumps on a table and recites "a ridiculous song" invented by Bilbo. "Here it is in full," said Tolkien. "Only a few words of it are now, as a rule, remembered."
There follows the tale, in thirteen ballad-like five-line stanzas, introducing each element in turn: "the Man in the Moon" himself, the ostler's "tipsy cat/ that plays a five-stringed fiddle", the little dog, the "hornéd cow" and the silver dishes and spoons.
Tom Shippey cites this 1923 poem and its mate, "The Man in the Moon Came Down Too Soon" (also from 1923, also subsequently included in The Adventures of Tom Bombadil) as typical examples of Tolkien's working strategy for reconstructing philological information about sources now lost. In this case the question is: what lies behind the abbreviated version of this poem that survives as a well-known but nonsensical nursery rhyme? By imagining a text that might reasonably have left the surviving rhyme, one can deduce clues that might have left other artifacts in surviving literature. Shippey argues that many of the scenarios in Tolkien's more serious work are similar recreations ("'asterisk' poems" in Shippey's phrase), attempting to explain abstruse passages in surviving Old English and Old Norse texts, especially from Beowulf.
The Extended Edition of The Hobbit: An Unexpected Journey has Bofur singing this song at Elrond's feast. According to screenwriter Philippa Boyens, the song could either have been made up by Bilbo and taught to Bofur, or the other way around.