The baby boomer generation, now in their 50s to 70s, should stop thinking about putting their feet up when they retire – and maybe not retire at all for the sake of their health, according to the government’s chief medical officer.

Professor Sally Davies, in her latest annual report on the health of the nation, to be published on Tuesday, is expected to say that people of retirement age might do well to stay in work if they can, or else get involved in community and voluntary activities that will keep both mind and body in better condition than sitting in a fireside chair.

“People are living longer than ever and so retirement presents a real opportunity for baby boomers to be more active than ever before. For many people it is a chance to take on new challenges, it is certainly not the start of a slower pace of life it once was,” said Davies.

“Staying in work, volunteering or joining a community group can make sure people stay physically and mentally active for longer. The health benefits of this should not be underestimated.”

Some 42% of 50-64 year-olds have at least one health condition and 24% have more than one. Staying active through appropriate work – heavy physical work such as building may not be advisable – or volunteering will help. Social engagement is also very important for mental health.

Davies told the Guardian that she was not saying that retirement should be abolished. She added: “We’re not saying you must stay in work. Moderate steadily. Stay active, stay in the community. Don’t become isolated, is the message, whether it’s staying in work, volunteering or working with the family. All of that is good for long term health, both physical and mental.”

Davies, who has just had her 67th birthday, pointed out that she is still working. She said that if she looks younger and fitter than her years, it’s “partly because I go out and exercise twice a week and try and maintain my weight. I think it’s very important people realise it’s never too late to try and increase activity and make sure the lifestyle is a healthy one”.

By 2020, it is expected that a third of British workers will be over 50. More than three-quarters of those aged 50 to pension age are still working, and 12% of people who are older than that.

Studies have shown that early retirement, when it leads to a busy and active social life, can benefit people who are better off, with larger pensions. But those who do not have enough money in retirement can suffer ill-health related to the stress of their financial insecurity.

The report, Baby Boomers: Fit for the Future, will also look at the sex lives of older people and the need to keep their weight under control, in order to avoid debilitating illnesses when they reach old age.