Marcum and Cain duel in the second game of a three-game series between the teams at Miller Park.
Marcum is 2-2 with a 3.31 ERA this season. The 30-year-old right-hander lasted five innings and allowed four runs -- three earned -- on nine hits while striking out five against the Astros. He threw 91 pitches before being hooked.
"It felt like a cramp there in the oblique area," Marcum said after the start. "I just kind of pitched through it. I did OK for a few innings and then just had that one rough inning there where they scored four. But other than that, it for the most part it felt all right."
Cain also is coming off a rare rough outing. The 27-year-old surrendered a season-high eight hits to the Cardinals and gave up four runs in six innings. However, the Giants provided him with enough run support to secure his third win.
"We want to pick up every guy, regardless of who it is," catcher Buster Posey said after the game. "But it feels good for us with Cain, because we know he lacks run support sometimes."
Cain is 3-2 this season with a 2.67 ERA. In his losses, he has allowed a combined five runs. Cain is 61-9 in his career when San Francisco scores three-plus runs for him.
Giants: Lincecum to stay the course
Despite Tim Lincecum's struggles -- he is 2-4 with a 6.04 ERA -- manager Bruce Bochy said he has no plans to skip a start or doing anything radical to react to the right-hander's struggles.
"He throws too well at times to make any move like that," Bochy said. "Every time he goes out there, I think he's going to have a nice game. He's so close to doing that."
Angel Pagan was held out of Monday's game with a case of stomach flu. The outfielder was examined by doctors, but Bochy said he hopes to have Pagan available Tuesday.
Brewers: Braun bombing in May
Ryan Braun is batting .382 (26-for-68) with three doubles, five home runs and 13 RBIs in May. The reigning National League Most Valuable Player is 7-for-18 (.389) against Cain in his career, but he left Monday's game after the 10th inning with a tight right groin.
Jonathan Lucroy leads the Majors with a .552 average with runners in scoring position.
After being given a day off Sunday, struggling second baseman Rickie Weeks went 1-for-5 against the Giants on Monday. Weeks is hitting .113 (7-for-62) in May with only one RBI.
The Brewers and Giants split the season series, 3-3, in 2011.