McLaren has been off the pace all season, and ended the year without a podium for the first time since 1980.
But Button and Perez's progress from 14th and 19th on the grid to top-six finishes at Interlagos buoyed the team ahead of the winter.
"It was an amazing job by everyone. It seems that we work better when we don't actually do any practice in the dry..." said Button.
"In the simulator this always felt like a very special track for us. I'm pleased with fourth, it's almost the third that we came here aiming for.
"We needed this at the end of the year - especially for myself, I've had a rough time in the last few races.
"Things happened to different people in the race, but you take it because it happens to you too."
PEREZ PRAYED FOR RAIN
Perez, who was in his last race for McLaren before being replaced by Kevin Magnussen, was pleased but also felt that more was possible.
He had lost five places on the grid due to a penalty for a gearbox change prompted by his Saturday crash, and had to ease off to save fuel while catching Nico Rosberg's Mercedes for fifth late on.
"Unfortunately from where we started it was a long way through. We were unlucky to lose those five places yesterday," said Perez.
"But we recovered well. I struggled to do more and I had to save fuel at the end of the race so I couldn't attack Nico anymore.
"I was praying for more rain, but it didn't come."
Button finished a few seconds ahead of Rosberg and Perez, and said he had struggled towards the end.
"The last two stints were strangely very difficult because I didn't know what the guys behind were doing in terms of stops and how much they were looking after their tyres," he said.
"I think I could've pulled a good gap, but I didn't want to destroy the tyres and be left there stranded."
- Sports & Recreation
- Nico Rosberg