By Philip O'Connor
"It's fantastic to come here, face the pressure and be able to come through at the end," the world number two told Swedish TV.
Federer now shares fourth place in terms of most ATP tournaments won, behind Jimmy Connors, Ivan Lendl and John McEnroe.
Federer was happy to have reached the 64 figure, telling a news conference: "You never know when it's your last tournament, that's why you want to savor every victory."
"Sure the summer was somewhat disappointing, with earlier losses at the French and at Wimbledon," he said. "But I played amazing at the Australian Open and played great at Cincinnati. I just had a bad win-loss record this year in finals.
He broke serve in the first set, only for Federer to break back immediately. The Swiss then held his own serve to love before breaking again to take the set.
Mayer wrong-footed Federer with some classy shots but a service break in the sixth game of the second set put the 16-times grand slam winner in the driving seat.
"It's been a tough week. I came from Shanghai where I played five matches, then the jet lag and the whole thing, so to back it up with another win is great," said Federer after picking up the trophy from Crown Princess Victoria.
Federer, who is president of the players' council, said the Tour is looking at proposals to end the season earlier.
He told reporters: "I don't remember the season ever finishing as late as it is this year. I'm not complaining because I don't mind a long season because I just take breaks during the season.
"But I just think for the average player I think it's smart to finish at some stage and have a proper off-season."
(Additional reporting by Adam Cox; Editing by Dave Thompson)