"It's obviously an important result for me," said Nadal, who had lost his past three five-set contests in Grand Slam action. "So it's important for me to win a match like this, having been down two sets to one. I'm very happy."
Nadal raced out to a 3-0 lead in the fourth set and appeared to finally wear down Zverev with the long baseline rallies that highlighted the match.
"Fighting," the 30-year-old Nadal said in his on-court interview of how he beat the No. 24 seed. "And running a lot. Everybody knows how good Alexander is. He's the future of our sport, and the present also."
Zverev appeared to have leg cramps at 2-2 in the fifth set. Sensing his opportunity, Nadal sprinted through the final four games of the match to prevail in four hours and five minutes.
"Even now I'm disappointed, but I know that this was a great match," Zverev said. "That was a great fight. There are a lot of positives in this match. I think he's probably one of the fittest tennis players in the history of the game. There are a few things here and there I could do better. All in one, I think I'm pretty happy with my performance."
In a third-round match that started at 11:58 p.m. local time, No. 15 seed Grigor Dimitrov of Bulgaria was eager to avoid a late-night marathon, dispatching 18th seed Richard Gasquet of France 6-3, 6-2, 6-4.
In other action, No. 13 seed Roberto Bautista Agut of won an all-Spanish match against David Ferrer 7-5, 6-7 (6), 7-6 (3), 6-4. Agut will face No. 3 Canadian Milos Raonic, who defeated Gilles Simon of France 6-2, 7-6 (5), 3-6, 6-3.