The night match between world number one Novak Djokovic, who is playing his first tournament since his Australian Open triumph in January, and Philipp Kohlschreiber was suspended with the top seed leading 1-0.
Struff saved all four break points he faced and took barely an hour to clinch his first career win over Zverev in five attempts.
Zverev downs Berrettini to clinch second Madrid crown
"I have been sick for a week. That hasn't changed unfortunately," third seed Zverev said. "I think I just got unlucky, got a virus somewhere and that's how it is."
Zverev lost to Nick Kyrgios in the final of the Acapulco tournament in Mexico nine days ago.
He said his main focus was to recover for the Miami Open that starts in Florida next week.
Next up for 55th-ranked Struff will be Canadian 13th seed Milos Raonic, who had his hands full before prevailing against American qualifier Marcos Giron 4-6 6-4 6-4.
"He came up with the goods and definitely pushed me to the brink there where I was getting a little bit frustrated," Raonic told reporters after converting three of his 12 break points.
"I think I created a lot of chances and a few maybe I didn't take the way I would have liked but he also stepped up well on his chances.
"I just kept missing opportunities. I could have drifted off a few times mentally."
Giron rued what might have been after failing to capitalise on a winning position.
"Even though he's a big favourite, it still hurts to lose, being up a break in the third," said the world 217.
"He really stayed disciplined. He kept fighting and putting ball in the court and I made a few mistakes. I think he showed why he's one of the best players."
Seventh seed Dominic Thiem beat Gilles Simon 6-3 6-1 while Croat Ivo Karlovic defeated Indian qualifier Prajnesh Gunneswaran 6-3 7-6(3).
Zverev puts on Madrid masterclass to down Thiem in semis
Zverev stuns Nadal to reach Madrid semi-finals