The sixth seed won a see-saw battle against American Frances Tiafoe 6-3 3-6 6-2 2-6 6-3, two days after going the distance against Radu Albot.
It was the 11th time the 22-year-old German has gone the full five sets in his relatively short career.
"I've been here before," he said afterwards. "It's usually what I do in the first few rounds of a grand slam, play five sets. Maybe it's to entertain the crowd.
"Frances gave me a real fight. I'm just happy to get the win somehow. I know if it goes the distance I am ready.
"I've known Frances since we were little kids, we played each other all through juniors.
"Every match we play is getting tougher and tougher, hopefully that will continue and we will play bigger matches throughout our careers."
David Goffin, the 15th seed from Belgium, beat French qualifier Gregoire Barrere 6-2 6-2 6-2.