"Bad day, bad day," said Martinez, who still earned the victory. "I used my experience to keep the team in the game. My body didn't physically click. I didn't feel good the whole game. I kept my team in the game and that's all that matters."
Doug Mientkiewicz also homered, breaking a 5-all tie in the eighth inning with his shot off reliever Julio Santana (0-1) and helping the Mets to their fourth straight victory and pushing them three games over .500 for the first time this season.
"We feel good," Beltran said of the Mets, who improved to 17-14. "We feel like we're playing the game right. We're getting hits when we need them most."
Martinez (4-1) struck out 11 but allowed a season-high five earned runs in seven innings of his first career start against Milwaukee.
"He doesn't have too many off days," Brewers first baseman Lyle Overbay said. "For us, it's the first time we faced him, so we're trying to get the feel for him and the next thing you know he's striking you out and you haven't figured it out yet. It's kind of tough."
Martinez couldn't hold a 5-3 lead after Beltran hit his second homer in the seventh. He walked Carlos Lee leading off the bottom half before Overbay hit his sixth homer of the season.
"It's weird to see Pedro give up home runs," New York manager Willie Randolph said. "His changeup was up in the zone a bit. But he keeps you in the game. He finds a way to make pitches."
Beltran, who has hit all six of his homers in games started by Martinez, helped the Mets tie it at 3 in the fifth. With two outs, Milwaukee starter Wes Obermueller walked Mike Cameron before Beltran followed with a homer to right.
Obermueller, making his second start in place of Ben Sheets,
allowed three earned runs and five hits in 4 2/3 innings.
"They've got some guys who can hit," Milwaukee manager Ned Yost said. "They've got a pretty potent lineup."
David Wright's second homer in two nights gave New York a 1-0 lead in the fourth before the Brewers finally got to Martinez in the bottom half.
Brady Clark was hit by a pitch leading off and took third on a single by J.J. Hardy -- Milwaukee's first hit. After Geoff Jenkins
struck out, Lee hit his fifth homer, only the second allowed by Martinez this season.
"We maximized our hit output, that's for sure," Yost said. "Carlos got a good pitch to hit and so did Lyle."
Boston is the only team Martinez has yet to face. He has 101 career games with at least 10 strikeouts. ... Lee has an RBI in six straight games. ... New York has won six straight against
Milwaukee. ... The Mets homered four times for the second consecutive game. ... Sheets is on the 15-day disabled list with inflammation of the inner ear. ... The Brewers are 7-19 at home against the Mets. ... Milwaukee has scored at least four runs in its last nine games.
Ohtani hits two-run homer vs. Padres
Shohei Ohtani cranks a two-run home run to right-center field in the Angels' 5-2 win vs. the Padres.
Clevinger suddenly pulled after 1 inning, Pads fall to Halos
The San Diego Padres might have suffered a blow to the front of their playoff rotation when right-hander Mike Clevinger was suddenly pulled after only one inning in his start Wednesday in a 5-2 loss to the Los Angeles Angels.
Kansas City Royals place Bubba Starling, Kyle Zimmer on IL to end their seasons
The Royals placed outfielder Bubba Starling and right-hander Kyle Zimmer on the injured list and returned left-hander Mike Montgomery and outfielder Franchy Cordero from rehab assignments to set them up for the final five games of the season.
Nats sweep Phils, drop Philadelphia below playoff position
The Philadelphia Phillies tumbled out of a playoff position, getting swept in a doubleheader by the Washington Nationals when Yadiel Hernandez hit a game-ending, two-run homer in eighth inning off Brandon Workman for a 8-7 win in Tuesday night's...
Who has the best rotation for MLB's postseason?
Chipper Jones, Rick Sutcliffe and Jon Sciambi explain why the Reds, Indians and Brewers respectively have dangerous rotations heading into MLB's postseason.
Mike Clevinger's start cut short by San Diego Padres after just one inning vs. Los Angeles Angels
Mike Clevinger, obtained in a blockbuster trade with Cleveland on Aug. 31, left San Diego's game Wednesday after just one inning of work.