It means that if a 40-year-old man and 50-year-old man had sex with the same number of partners, the 50-year-old would have the better sex life.
The US researchers looked at data on 6,000 people aged 20 to 93 based on surveys taken in 1995, 2003 and 2013. Among the questions was "How would you rate the sexual aspects of your life these days, from the worst possible situation to the best possible situation?"
The findings showed that while "frequency of sex became less important with age, the amount of thought and effort invested in sex became more important".
Lead researcher Miri Forbes, of the University of Minnesota, said: "These changing priorities were key predictors of sexual quality of life for older adults, and appeared to buffer its decline.
"When we matched older and younger adults on key characteristics of their sex lives - along with sociodemographic characteristics, and mental and physical health - older adults actually had better sexual quality of life".
She added: "Together these findings suggest that as we age, our sexual priorities change and we develop knowledge, skills and preferences that protect against aging-related declines in sexual quality of life. Since wisdom is 'the quality of having experience, knowledge and good judgment', our study suggests that life experience is fostering sexual wisdom.
"This is great news, as a satisfying sex life has been found to be important for health and well-being, regardless of age.
"For older adults in particular, being sexually active predicts a longer and healthier life."
A study earlier this year by the International Longevity Centre showed that for many people, a satisfying sex life does not end when they reach retirement age. One in four men over the age of 85 and one in every ten women reported some sexual activity in the past year.
Erectile dysfunction - which was reported by two thirds of men over 65 - also appeared to pose no barrier to a healthy sex life.
The benefits of sex have been well documented and NHS guidelines state that it can be good for your heart and counts towards the amount of exercise you should do each week.
Sex can also stave off dementia and reduce the risk of angina and ulcers.