Apologies for the rather brief reply, I am typing on mobile.
The election of 1840 was different in a few ways which combined to drum up huge participation. First, it featured a new national political party finally coming into its own, the first significant one founded since the end of the previous two-party system in the 1820s: the Whig Party. True, it had been around since 1834, but in the 1836 election the Whigs fielded four candidates against the Democrat Van Buren, and failed. In 1840 they focused on one, the popular William Henry Harrison, who had garnished the most votes of all Whigs in ‘36. The combination of a better political strategy and a very popular candidate very much helped in ‘40.
Second, the 1840 election introduced changes to campaigning. Harrison made campaign rallies into something more akin to a festival or sometimes a party. Originally, the Democrats had attacked Harrison for being old and washed up, claiming that a donation of a log cabin and hard apple cider would be enough to make him forget about politics. The Whigs used that attack to play on American nostalgia for simple living, and served cider at huge rallies/festivals that were often pioneer or wilderness themed. Riding on those themes appealing to the common man, they may have held the largest political convention in American history up to that point. They also had the first wildly popular campaign song in “Tippecanoe and Tyler Too,” which the country’s first magazine, the North American Review, compared to France’s “La Marseillaise.”
Third, by 1840 the eligible voting pool was much larger than it had been twenty years prior. By the 1820s land requirements had been largely eliminated, and in the 1840 election other restrictions such as literacy and religious tests were removed such that almost every white man could vote, and the Whigs capitalized on that by appealing to newly enfranchised poor whites while also casting the Democrats and van Buren as elitist snobs.
Finally, the American economy had suffered tremendously in the Panic of 1837. Van Buren came to be blamed, especially by Whigs, even though it was likely Andrew Jackson’s policies combined with domestic and foreign (British) economic events that caused it. The years of recession motivated votes for the Whigs, who stood for the antithesis of Jacksonian doctrine.
While you're waiting for responses, there was a previous answer that specifically looked at the decline of voter turnout post 1876 by /u/Georgy_K_Zhukov. May help to answer part of your question.