You'll often hear that it's important to invest in stocks at all times -- and that extends to retirement. But as stressful as a volatile market can be for someone who's years away from retirement, it can be exponentially more stressful when you're approaching retirement or already in it.

It's therefore not shocking to see that 61% of older Americans cite stock market volatility as a financial concern in the context of retirement, according to recent Nationwide data. But if stock market worries are keeping you up at night, here's what to do.

A person at a kitchen table with a serious expression.

Image source: Getty Images.

Make sure you're not overly invested in stocks

You don't want to dump your stocks completely as a retiree. That's because you need the untapped portion of your portfolio to continue generating growth. That could allow for a higher annual retirement income.

At the same time, once you're ready to retire, it could be a good idea to allocate as much as 50% of your portfolio to more stable assets, like bonds. In fact, the nice thing about bonds is that not only is their value less likely to swing wildly from one day to the next, but they also, by nature, serve as an ongoing income source.

Granted, you could say the same thing about dividend-paying stocks. But whereas companies that pay dividends could halt that practice at any time, bond issuers are contractually obligated to pay interest on a regular basis. And the predictability of that income could be crucial to your financial security at a time when you're living off of your portfolio to at least some degree.

Keep plenty of cash on hand

Right now, you can earn a nice amount of interest on the money you have in the bank. Historically, that hasn't always been the case. And once the Federal Reserve begins to cut interest rates, which is likely to happen at some point this year, savings accounts might start to pay a lot less generously.

Even so, it pays to always maintain a healthy cash balance in your savings account when you're near or in retirement. In fact, you should aim for a minimum of one year's worth of expenses in cash. That way, if the stock market takes a dive and it's also not a good time to cash out bonds, you won't have to touch your portfolio because you'll be able to pay your bills out of your cash reserves instead.

Try not to lose sleep

It's natural to be nervous about stock market volatility when you're approaching retirement or have already left the labor force for good. But if you put protections in place, a stock market downturn won't have to upend your retirement finances.

Remember, some of the steps you can take to mitigate your risks as a stock market investor apply to your later years as much as your younger years. Diversifying your portfolio, for example, is one key move to make to help protect yourself from losses. And if you put together your portfolio years ago, give it a thorough check to make sure it's still as diversified as you think it is. A good time to make changes is when the market is nice and strong -- not when it's going through a rough patch.