Miami starter Dan Haren, in his third Grapefruit League start, threw four shutout innings, scattering three hits while striking out two. The right-hander built up his pitch count to 58.
Detroit's Alfredo Simon also worked four innings, but allowed three runs on three hits, and he exited after 53 pitches.
Martinez, who also had a double, hit his two-run shot off Nick Massett.
Ozuna's homer was to left off Simon in the fourth inning. Stanton added an RBI single in the fifth and a sacrifice fly in the first.
The Marlins manufactured a run in the first inning on Michael Morse's two-out RBI single. Christian Yelich, who walked and stole second, raced home on Morse's single to right.
In the third inning, Miami tacked on a second run on Stanton's sacrifice fly to right, which scored Dee Gordon. The speed of Gordon came into play. Simon hit Gordon by a pitch to lead off the inning. The speedster stole second and advanced to third on Yelich's groundout.
Stanton, seeking his first home run of the spring, lifted a long fly into the wind in right. The ball was caught near the warning track, and Gordon raced home easily.
"It's a process, getting these guys at-bats, their swings get better, all of them," Marlins manager Mike Redmond said. "Of course, you like to see guys have good at-bats in RBI situations when we can score runs. We were really aggressive on the bases. I think everyone can see the difference it makes when Dee and Yeli get on base at any point."
The Tigers' biggest threat off Haren came in the second inning when James McCann and Andrew Romine had back-to-back singles to open the frame. But Haren got Jose Iglesias to bounce into a 6-4-3 double play. J.D. Martinez had a two-out double in the first inning, but was stranded.
Up next: The team is off on Monday, and returns with a split squad on Tuesday. At Roger Dean Stadium in Jupiter, Jarred Cosart starts for Miami against the Cardinals. In the other game, the Marlins travel to Port St. Lucie to face the Mets. Lefty Brad Hand, in the mix for the fifth starter spot, will get the start.