Nadal, whose last victory on grass came at Wimbledon in 2010, was thrilled to have gained some much-needed confidence and match practice ahead of Wimbledon, which starts on June 29.
The victory is just Nadal's second tour-level singles title this year after he triumphed at the ATP Argentina Open in March.
"It's a very special title," Nadal, who previously won the Stuttgart title when it was played on clay in 2005 and 2007, told the official ATP website.
"Since 2011 I didn't play a final on grass, so win a title here is very good news for my game and for my mentality too. Congrats to Viktor for a great tournament. He's playing great and will have some positives for the week.
"At this point of the season, every victory is important and every title means a lot to me. I'm happy for that… Thank you very much for all the support here in Stuttgart."
Nadal's next assignment will be the ATP Aegon Championships in London, where he will face Alexandr Dolgopolov in the first round.