The story that I've heard repeated often is that developer salaries tend to flatline in a person's 50s and even retreat a bit as they close out their careers, while managerial salaries continue to increase throughout the later years of a career. Whether this is supported by actual data or not, I don't know. I can certainly see the potential for this to happen with developers who get complacent in a long-term job where they've maxed out their career path and then get laid off, which could force them to take a significantly lower-paying job elsewhere.
I've transitioned from development into management over the past few years, largely because I'd endured a string of awful managers and was confident I could do a better job. Management is definitely not for everyone, though -- it requires a different set of skills from development, and many developers lack the patience and people skills needed to do the job well. But developers with an interest in and aptitude for management clearly make the best managers for development groups, because they have a deep understanding of the issues their teams face, and they have a much easier time building trust and credibility with the group.
In the end, it's really about where your skills and interests lie. Do you have the patience to deal with petty office politics, hand-holding MBAs through repeated explanations of the mythical man month, fielding complaints from your team that you're too focused on schedule and complaints from above that you're not focused enough on schedule? Do you get gratification out of identifying and building on your developers' strengths and helping them earn their way to a promotion? Do you enjoy solving problems related to scoping, sequencing, and balancing of other people's work to define and meet milestones? Do you mind dealing with software licenses, office supply purchases, and other mundane "care & feeding" tasks? Can you be content relegating coding to a hobby activity, rather than your main pursuit?
If you answered "yes" to all of the above, then it may be worth considering a management path. If not, then you should stay sharp, stay current, and keep your skills valuable and marketable, regardless of your age.