Hey Diddle Diddle

"Hey Diddle Diddle" (also "Hi Diddle Diddle", "The Cat and the Fiddle", or "The Cow Jumped Over the Moon") is an English nursery rhyme. It has a Roud Folk Song Index number of 19478.
A version of the rhyme is:
The rhyme is the source of the English expression "over the Moon", meaning "delighted, thrilled, extremely happy".
The melody commonly associated with the rhyme was first recorded by the composer and nursery rhyme collector James William Elliott in his National Nursery Rhymes and Nursery Songs (1870). The word "sport" in the rhyme is sometimes replaced with "fun", "a sight", or "craft".
The rhyme may date back to at least the sixteenth century. Some references suggest it dates back in some form a thousand or more years: in early medieval illuminated manuscripts a cat playing a fiddle was a popular image. There is a reference in Thomas Preston's play A lamentable tragedy mixed ful of pleasant mirth, conteyning the life of Cambises King of Percia, printed in 1569 that may refer to the rhyme:
Another possible reference is in Alexander Montgomerie's The Cherry and the Slae from 1597:
The name "Cat and the Fiddle" was a common name for inns, including one known to have been at Old Chaunge, London by 1587.
The earliest recorded version of the poem resembling the modern form was printed around 1765 in London in Mother Goose's Melody with the lyrics:
In L. Frank Baum's "Mother Goose in Prose", the rhyme was written by a farm boy named Bobby who had just seen the cat running around with his fiddle clung to her tail, the cow jumping over the Moon's reflection in the waters of a brook, the dog running around and barking with excitement, and the dish and the spoon from his supper sliding into the brook.
In P. L. Travers's first Mary Poppins book, the titular character tells the children more about a cow they notice in the street, namely that she once jumped over the Moon to cure her dancing affliction, as advised by a king, who references an already-existing story of "the Cow Who Jumped Over the Moon".
In J. R. R. Tolkien’s The Fellowship of the Ring, the rhyme is said to be a remnant of "The Man in the Moon Stayed Up Too Late", a much longer narrative poem written by the character Bilbo Baggins.
The numerous theories seeking to explain the rhyme have been largely discredited. James Orchard Halliwell's suggestion that it was a corruption of an ancient Greek chorus was probably passed to him as a hoax by George Burges.
Another theory is that it comes from a low Dutch anti-clerical rhyme about priests demanding hard work. Other alleged bases for the rhyme include the Egyptian goddess Hathor, the Hebrew Flight from Egypt, or even the relationships of Elizabeth, Lady Katherine Grey, with the Earls of Hertford and Leicester. The "cat and the fiddle" has also been tied to Catherine of Aragon, Catherine I of Russia, Canton de Fidèle, an alleged governor of Calais, and the game of cat (trap-ball). An apparently modern theory is that it may refer to the constellations of Leo the cat, Lyra the fiddle, Taurus the cow, Canis Minor the little dog, and Ursa Major and Ursa Minor the Big and Little Dippers, which align with the Moon around the winter solstice.
The profusion of unsupported explanations was satirised by J. R. R. Tolkien in his fictional explanations of the poem "The Man in the Moon Stayed Up Too Late" referenced above. Although there is some support for the trap-ball theory, scholarly commentators mostly conclude the rhyme is simply meant to be nonsense verse, a type of literary nonsense.