The number two seed praised Tsonga's returning and also admitted that he enjoys being involved in memorable matches.
"It was a tough finish, the whole match was tough," Federer said afterwards. "Every set could have gone either way.
"We know what Jo can do, he is always a dangerous opponent and it was a pleasure to play against him. I think he returned better than he has in the past and that will make him even harder to beat in the future.
"You take the game point by point but at the end you can enjoy [the atmosphere]. I am big fan and I watch the matches at other tournaments, so maybe somebody watches me. Five-set thrillers are always special and I was lucky enough to be part of one today."
Federer will face Murray, whom he beat in last year's Wimbledon final, on Friday morning.