The seven-time world champion has had a torrid time so far this season as the German manufacturer struggled with porpoising, or bouncing at high speed.
It continues to hinder Hamilton, but fifth was a huge improvement from the 16th he qualified for at the last grand prix in Saudi Arabia.
Only Friday he had complained there had been no improvement since Jeddah, but struck a different tone after his efforts on Saturday in Melbourne.
"I'm really grateful for the work at the factory in turning the car around from yesterday and I almost got P4, which would have been cool, but we'll be fighting for that position tomorrow," he said.
"I'd say this era of car is the worst for porpoising that I've ever experienced," he added, and that "driving it is a real challenge -- it's like a rattlesnake".
"We need to find the right balance in ride height to give us performance while controlling the bouncing tomorrow.
"(Teammate) George (Russell) and I tried slightly different things on our cars today so hopefully that's good learning for the team to take into the race."
Russell will start alongside Hamilton on the grid Sunday in sixth, consolidating a good day for the team.
"When you consider the challenges we are facing at the moment, the team worked very well to extract everything from the car after two difficult practice sessions yesterday," said Mercedes chief Toto Wolff.
"The drivers maximised their opportunities with the car that's under them right now and it's great to see the positive approach they are bringing to each session as we continue learning."
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)