It is not possible to know for sure why changes in attitudes happen among a population. Historians can speculate, but cannot know for sure.
The most likely reason for this is that the United States had clearly become an independent country that was on the rise. The Louisiana Purchase and the War of 1812 had helped with this. In the 1820s, the Monroe Doctrine added to this sense. The Erie Canal had helped to boost the economy and to make Americans feel like they were reaching a new era of prosperity. In such circumstances, it is not surprising that they would start thinking about their national character. They would be interested in thinking about what sort of a country they were going to become and the nature of their character would play a part in that. It is as if the country was growing from adolescence to adulthood and wanted to find out who it was as it came to its full growth.