This time, the Miami Marlins looked pretty good at the plate.
Stanton's big swing capped a stretch of seven consecutive hits, including Realmuto's two-run single and an RBI single by Christian Yelich, off Austin Pruitt (3-1) to start the sixth. Realmuto added a two-run triple during Miami's three-run seventh, helping the Marlins to a 10-5 lead.
Miami scored two or fewer runs in five of its previous six games.
"We were able to put a bunch of hits together which was good because they were coming from all different places," manager Don Mattingly said. "I think you become a dangerous club when everybody feels like they don't necessarily have to carry the load, they just have to get their hit and move that line."
Tampa Bay got a solo homer from Daniel Robertson. Blake Snell struck out nine and walked three while allowing two runs and six hits in five innings. The left-hander has gone five innings or fewer in five straight starts, and nine of his last 10.
"Just getting better and happy about it," said Snell, who entered with 18 walks and 21 hits over 26 1/3 innings in five earlier starts this year. "There's still a lot of work to be done."
Rickie Weeks, who entered 0 for 13 with nine strikeouts with runners in scoring position, had an RBI double and Kevin Kiermaier, mired in an 1-for-38 slump, added a two-run single to put the Rays up 3-0 in the second.
"It got away from us," Tampa Bay manager Kevin Cash said.
Ozuna hit a drive off a banner hanging above the left-field upper deck in the fourth, and Adeiny Hechavarria tacked on an RBI double to get Miami within one. Ozuna has hit in all 20 games he has played against the Rays.
"I don't know how far it went because I didn't look at it," Ozuna said. "I just put my head down and ran the bases."
Robertson responded with a leadoff drive to center in the bottom half.
Miami's Miguel Rojas had four hits, while Hechavarria picked up three. The pair combined for five runs scored.
Marlins: RHP Edinson Volquez was placed on the 10-day disabled list with a right thumb blister and RHP Nick Wittgren was recalled from Triple-A New Orleans. Mattingly expects Volquez to miss one start.
Rays: Evan Longoria went 0 for 4 with a ninth-inning sacrifice fly as the designated hitter after sitting out two games due to a sore left foot. Cash hasn't ruled out Longoria playing third base Thursday night. ... Tampa Bay recalled Jose Alvarado from Double-A Montgomery to fill the left-handed reliever role vacated by the injured Xavier Cedeno (left forearm tightness).
Marlins outfielder Ichiro Suzuki is hitting .152 after going 1 for 4. He did make two nice catches, including a sliding grab on Steven Souza's game-ending fly ball.
Ozuna is hitting .400 (30 for 75) against the Rays during his 20-game streak.
Marlins: RHP Dan Straily (1-2) will take the hill in the series finale Thursday night. He has struck out 29 and walked 12 over 26 innings this season.
Rays: RHP Matt Andriese (1-1), Thursday night's starter, has allowed 21 homers over 90 2/3 innings since the 2016 All-Star break.