Retirement might sound wonderful, but all too often the reality is disappointing. Some 28 percent of recent retirees polled by Nationwide Retirement Institute last fall said that life was worse in retirement than it was when they were working. It's one of several surveys to find that, for roughly a quarter of retirees, life after work involves isolation and a loss of direction.

"I have come to believe that mankind is not meant to just sit around," says Larry Jacobson, a retirement life-planner based in Northern Cali­fornia. "It usually takes about six months before people say golf is fun, but there's no fulfillment."

Spouses James Pawelski and Suzann Pileggi Pawelski, who study and write extensively about the route to happiness, say few people realize that planning for retirement contentment is as important as planning for economic health.

Quantifying a Happy Retirement
10 years
The median lifespan of the happiest people is roughly a decade longer
Source: D. Danner, D. Snowdon, and W. Friesen, "Positive Emotions in Early Life and Longevity: Findings From the Nun Study," J Pers Soc Psychol, May 2001
10 percent
of preretirees are financially prepared for a 30-year retirement
Source: Age Wave/Merrill Lynch, "Finances in Retirement: New Challenges, New Solutions," 2017
81 percent
of retirees said health was an important factor for a good retirement; 58 percent said financial security was crucial
Source: Age Wave/Merrill Lynch, "Health and Retirement: Planning for the Great Unknown," 2014
81 percent
of Americans over 65 own their homes
Source: Bureau of Labor Statistics, 2013
Average home equity of those over 65
Source: Age Wave/Merrill Lynch, "Home in Retirement: More Freedom, New Choices," 2014

"There are people who engage in magical thinking about retirement happiness, just as some engage in magical thinking about retirement security--they want it, but they take no steps to get there," says James Pawelski, who is also the executive director of the International Positive Psychology Association. He adds that "the habits formed before we are 50 are the biggest determinant on how well you retire."

So what can you do now to make your retirement years happier?

1. Reduce financial stress.

Money may not guarantee retirement happiness--but paying attention to it is a good first step. Once you retire, you'll want to be able to cover your regular bills without worry, says Robert Frick, the corporate economist at Navy Federal Credit Union.

To reach financial security, take three concrete steps: Pay off debts; consider moving to a smaller residence; and create regular sources of income.

Frick advocates paying off all debts, including your mortgage. If making mortgage payments once you're retired is likely to be tough, he suggests making it a late-life career goal. "The more debt you have, the less happy you are," he says. "You need to plan to make your retirement debt-free."

If you can't pay off the house before you retire, consider downsizing, he adds: "If you have a big house--particularly if it's older--who needs the expense of keeping it up?" Selling will also allow you to tap decades of built-up home equity, which can help you pay cash for a smaller residence, and you can put any leftover money into your investment portfolio.

Finally, if you won't have enough regular income to cover your fixed expenses in retirement, consider creating a "pension" to fill the gap. You can do this by buying income annuities, which promise to pay a set monthly amount for life, just like a pension. You can do this when you retire by buying so-called immediate annuities, which start paying you a monthly stipend right away. (Make sure to avoid what are known as variable deferred annuities, which are higher-cost products with less impressive returns.)

If you're more than five years away from retirement, you can create this sort of pension the same way you build your 401(k) account, through regular monthly investments. Lauren Minches, vice president at financial-technology startup Blueprint Income, says this approach has many advantages. It lets you diversify your annuities among a wide range of insurers, reducing the chance that any one company's failure could derail your savings. Income annuity returns are also set on the date of purchase, and interest rates are historically low today. By buying over time, you can potentially earn higher returns, boosting your monthly income.

"One of the reasons people become so anxious when they retire is because we go from living off reliable salaries to having almost no reliable income at all," says Minches. "When you have income from a job, what you spend one month doesn't necessarily jeopardize what you can do the next month. But when you retire, every dollar you spend in your 60s is one that you won't have in your 70s. That makes people reluctant to spend anything, because they're worried about how it will affect them later."

Buying annuities eliminates those worries, as well as the worry of outliving your savings. Income annuities typically pay a set monthly amount for life, regardless of how long you live. "It allows you to continue living the way you always have, with money coming in every month, no matter what happens," Minches says.

2. Invest in life after work.

The working world creates a set of regular social interactions, which you lose once you retire. That could increase depression and threaten your physical health. Social well-being is linked to lower levels of an inflammatory response molecule called interleukin-6, which is connected to a wide range of age-related disorders such as Alzheimer's and osteoporosis. Isolation also increases the risk of high blood pressure and disease, according to the National Institutes of Health.

So join a book club; a bridge club; volunteer; set up regular golf or lunch or shopping dates. The activities are less important; what matters is that you see other people regularly and stay active.

3. Set retirement goals.

The happiest retirees include those with a strong sense of purpose, says Catherine Collinson, president of the Transamerica Center for Retirement Studies. You don't need to set up a new business or climb Everest. Your goals could involve seeing friends, setting aside time to see your kids or to babysit your grandkids, taking a class, or learning a new skill.

Transamerica's 2017 retirement study found that 97 percent of retirees with a strong sense of purpose were generally happy, compared with 76 percent without that sense. These retirees spent more time with family, traveling, doing volunteer work, and pursuing hobbies.

"It's very important to have a reason to get up in the morning and find something that will propel us forward," Collinson says.