"Mine was higher," Yelich said. "His was straight on a line. It was pretty impressive."
"These homers aren't like cheapies," manager Don Mattingly said. "You're going to have to hit them here."
Four of the Marlins' six hits were homers. The long balls spoiled a fine outing by the Mets' Jacob deGrom, who tied a career high with 13 strikeouts in seven innings and allowed two runs, both homers.
"After I gave up those two home runs, I wasn't very happy and I wanted to strike everybody out," deGrom said.
He remained without a decision in three starts despite an ERA of 1.89.
Miami trailed 4-2 when Miguel Rojas walked with two out in the eighth against Fernando Salas (0-1). Yelich followed with his second homer of the year , pulling a 3-1 pitch into the upper deck, and Stanton's third homer came on a 3-2 delivery and landed in the center field hedge.
"We can hang with anybody," Stanton said. "We know that. That's a very tough team over there, one of the best in the National League. So are we."
The homers came on fastballs as Salas tried to avoid walks.
"I just fell behind on the count," he said. "I felt bad for the team. They played hard every inning, and I couldn't come through late for them."
Miami's A.J. Ramos pitched a perfect ninth for his second save. It was the third consecutive one-run game in the series, with the Marlins winning the past two after losing in 16 innings.
"A lot of good things are happening," Mattingly said. "It's going to be a fun summer."
Asdrubal Cabrera's solo homer in the eighth against Junichi Tazawa (1-0) put New York ahead 4-2. The Mets have homered in 11 consecutive games and came into the game leading the majors with 21 home runs.
Bour hit his first homer leading off the second, and three pitches later Ozuna hit his fifth. Ozuna came into the game leading the majors with 16 RBI.
Miami's Adam Conley retired 15 in a row but allowed three runs in six-plus innings. He also pitched in emergency relief in the 16th inning of Thursday's marathon and took the loss.
"As crazy as it has been for me, the last three days have been some of the most fun I've had playing baseball," Conley said. "Unorthodox situations and extreme circumstances are the kind of things that get me fired up."
With the Mets trailing 2-1 in the seventh, Neil Walker became their first baserunner since the second when he reached on a leadoff bunt single. Granderson followed with a triple that glanced off the glove of center fielder Yelich as he tried to make a diving catch on the warning track.
"I ended up eating the whole warning track," Yelich said. "I got it in my nose, my eyes, my mouth, everywhere."
Marlins: C J.T. Realmuto, who had a walk-off double Friday, sat out because he wasn't feeling well. The Marlins suspected a bout of food poisoning.
Mets: MLB home run leader Yoenis Cespedes was back in the lineup after missing one start because of the flu. He went 0 for 4 with two strikeouts.
Mets RHP Matt Harvey (2-0, 2.92), who left his most recent start in the sixth inning because of tightness in his left hamstring, is scheduled to pitch in Sunday's series finale against RHP Dan Straily (1-1, 7.56).
More AP Baseball: https://apnews.com/tag/MLBbaseball