Haydn was twenty-four years older than Mozart was, and it is assumed that his sonatas must be earlier in style. He became a Mason at the age of fifty-three on the 11th February, 1785. The lodge of which he was a member held the view that "The Freemason serves Mankind in all parts of the world, under all kinds of Governments, in public or in secret." It is believed that it was his friendship with the great one, (Mozart), which brought about his interest in Masonry. Also, it was in this lodge that Mozart's father Leopold, was a member. It was also a Freemason, Leopold Haschka, whose words were set to music by Haydn in "Gotterhalte" as the German National Anthem.
In 1791 he was in England performing at various concerts which included one at the Academy of Ancient Music at Freemason's Hall. At the end of the year the sad news of Mozart's death reached him and he wrote to a fellow mason and banker Johann Michael Puchberg, "For some time I was beside myself about his death, and I could not believe that Providence would so soon claim the life of such an indispensable man." Mozart had died at the early age weeks short of his thirty-sixth birthday on 15th October 1791.
Haydn on his return to Vienna, met a young musician named Ludwig van Beethoven, whom he invited to come to Austria and study with him, therefore Beethoven had two other persons closely connected with him who were also Freemasons: his doctor/biographer and his teacher.
In 1795 Haydn returned to England and left shortly after with a small libretto of an oratorio called "The Creation" which was destined to become one of his greatest works. The scholars believed that he carried with him a deep impression of his visit to Westminster Abbey where the choir sang Handel's "Messiah" and during the "Hallelujah Chorus" the congregation rose to their feet. This had a marked effect on him and created the desire to write such a work. This piece is by Handel and closely resembles that well-known piece.
Masonry, facing persecution both in Austria and France, Haydn set about to complete the script and had a great interest in the Masonic works completed by Mozart and it was and is still believed that "The Creation" is of the same nature as "Die Zauberflote." This piece is called "The Miracle" and relates to the beginning and once again Masonic symbolism is caught up in it. Another composition that I would recommend for your listening pleasure composed by this legend is "Surprise."