This melancholy mood was not simply a result of the trouble with Napoleon. Tolstoy is poking fun at the Romanticism that was extremely fashionable in Russia and the rest of Europe at this time. Romanticism started in the late eighteenth century as a reaction to the rationalism of the Enlightenment, and to the changes of the Industrial Revolution. The movement, which encompassed art, music, literature and philosophy, emphasised the importance of strong emotional responses over rational ones.
A lot of young men across Europe began to model themselves on the great Romantic figures such as Beethoven, Byron, Pushkin and Goethe. Some of them adopted melancholic personas as a part of this, for example, Captain Benwick in Jane Austen's Persuasion, who takes the melancholy Romantic persona to heart.