Seven different players were on target for Die Mannschaft, including an own goal from Roberts Ozols. Joachim Low's men found some much-needed momentum ahead of the championship.
But the former world champions weren't done yet. Timo Werner and Leroy Sane joined the act after the break on either side of a superb consolation strike from Aleksejs Saveljevs.
Just a week from now, Germany kick-off their Euro 2020 campaign against France.
Here are the player ratings for Germany:
Manuel Neuer - 7/10
In his 100th appearance for Germany, unprecedented for a goalkeeper in the country's history, it was all going according to plan. Latvia barely threatened and a clean sheet looked imminent. But then Saveljevs robbed him of that with a peach of a long-range strike. Nevertheless, a straightforward match for Neuer.
Matthias Ginter - 7/10
He generally showed good positional awareness and even hooked a few crosses forward. The only sore note of his game was a poor challenge late on which conceded a free-kick to Latvia.
Mats Hummels - 7/10
Hummels was more interested in the attack tonight as he tried to connect with a couple of crosses forward, but his best bit of the match was a sublime cross for Gnabry's goal.
Antonio Rudiger - 7/10
With the visitors pushed on the back foot for most of the game, Rudiger had all the time to move further forward than usual to get the ball upfield. He even fired a shot wide off the post in the first-half.
Joshua Kimmich - 7.5/10
Kimmich was the cog that kept Germany ticking, breaking down Latvia with incisive throughballs and laying some excellent crosses, one of which set up Werner for their sixth goal.
Ilkay Gundogan - 7/10
The midfielder was tidy in possession and gave Latvia plenty to think about with his movement, whilst also scoring a goal. He was hooked off just after the hour mark.
Toni Kroos - 8/10
Kroos, who's coming off the back of a grueling campaign with Real Madrid, was once again a reservoir of energy. He constantly won the ball back and knitted passes together. An underrated workhorse.
Robin Gosens - 7.5/10
An excellent performance from the Atalanta star, who triggered the onslaught with a sublime finish from a tight angle and then teed up Gundogan to double Germany's advantage. He made a strong case to start for the former world champions at the Euros.
Kai Havertz - 7/10
Havertz was a live wire down the wing, linking up with Kimmich and laying excellent crosses. He teed up Gosens for the opener and forced an own goal for Germany's fourth of the night with a cross from a tight angle.
Thomas Muller - 8/10
Back in the line-up three years later, Thomas Muller played like he never left. His ability to pick out passing lanes still continues to amaze. The veteran Germany star also got on target in the first-half. A memorable return from exile for the Raumdeuter.
Serge Gnabry - 7.5/10
He often dropped back to help build attacks and scored Germany's fifth goal with a spectacular finish from the edge of the box.
Timo Werner - 7/10
It took him just three minutes to find the net after coming on, sweeping Kimmich's cross home with a delicate first-time finish.
Jamal Musiala - 6/10
The 18-year old came on for Muller in the 78th minute. Besides a few good touches, there was nothing much to see from him.
Niklas Sule - 6/10
He came on for Rudiger after the hour mark and comfortably slotted in the defense.
Leroy Sane - 7/10
The Bayern Munich star restored Germany's six-goal lead almost immediately after Latvia's strike and generally looked promising in their attack.
Emre Can - 6/10
A forgetful cameo from Can, who offered nothing in midfield after replacing Gundogan.
Christian Gunter - 6/10
He was nowhere like Gosens and passed off mostly as a spectactor.