Wall Street’s historic gains in 2013 have boosted the value of Americans’ retirement accounts to record highs, according to several plan managers, restoring a critical component of household wealth.

Fidelity Investments, the nation’s largest provider of retirement plans, said the average balance in its accounts at the end of last year was $89,300 — nearly double the amount during the depths of the recession . Vanguard, another major fund manager, said its plans clocked in at $101,650, the highest level since it began tracking the data in 1999.

“While there is more to be done to help Americans save more effectively for their retirement, these are positive trends that show we are clearly moving in the right direction,” said Jean Young, senior analyst at the Vanguard Center for Retirement Research.

The rebound comes just as the wave of baby boomers reaching retirement age is beginning to crest. The most recent Census showed the ranks of seniors at historic levels: More than 40 million people were age 65 or older, making up 13 percent of the population.

Some economists have argued that the rapid rise in stocks could encourage some older Americans who delayed retirement during the downturn to finally to leave their jobs.

Retirement accounts have become an increasingly important part of workers’ long-term financial security as fewer companies provide pensions and other defined benefits. Though retirement accounts give workers more control over their savings, the recent financial crisis also highlighted the enormous risks to which their nest eggs are exposed.

Since then, stock markets have skyrocketed as the economic picture has improved and the Federal Reserve has sponsored an unprecedented infusion of stimulus. The Dow Jones Industrial Average gained almost 30 percent last year to reach new nominal highs. According to Fidelity, market gains fueled more than three-quarters of the increase in 401k balances.

Contributions from employees or their companies accounted for the remainder of the gains. Many businesses match a percentage of the savings that workers put into their retirement accounts. However, a growing number of companies are reducing the match or changing the schedule of contributions.

An analysis by the Federal Reserve Bank of Philadelphia  found that the percentage of people who said they were leaving the workforce to retire began to rise in 2010, after the recession ended. But the number picked up in 2012 as the stock market began to improve. Since then, retirement has been the most important contributor to people leaving the labor force, the research found.

“A plausible conjecture is that the 2008 financial crisis and associated loss of wealth might have had the effect of delaying their retirement age, while the subsequent recovery of financial wealth has allowed more of them to retire in the past few years,” wrote Shigeru Fujita, a senior economist at the bank.

While that theory is still being debated, there is widespread agreement that the aging of America is one of the main factors in the country’s shrinking workforce. According to  research by the Federal Reserve Bank of Atlanta, nearly 13 million people left the labor force from the start of the recession through the end of last year. More than 40 percent of them — about 5.5 million people — quit working to retire, making it the most common reason for leaving.

“I don’t think they’re going to be drastically affected by rising market values,” said Sara Rix, a senior strategic policy adviser with the AARP Public Policy Institute.

Analysis by the Center for Retirement Research at Boston College showed that Wall Street’s gains in 2013 only modestly improved Americans’ retirement prospects. The center looked at an index of financial security for working-age households. It found that 53 percent risked being unable to maintain their standard of living after retirement in 2010. That number dipped only slightly in 2013, despite the bull market.

Among the reasons the report cited for the modest decline was the distribution of stock market gains. They were enjoyed mainly by high-income households, which held 17 percent of their wealth in stocks. By contrast, only 2 percent of poor families’ wealth was in equities.

The more important factor in retirement security is housing prices, according to the center. While real estate values have improved since the recession, they have not enjoyed the big jump seen in the stock markets.

“The only way out of this box is for people to save more and/or work longer,” the report concludes.