The poor run production, though, hasn't been sustainable over a longer span as the club has won just six times over a 14-game stretch that has produced 2.43 runs per game and a .176 average with runners in scoring position.
Catcher Jeff Mathis hit a two-run double in the seventh after hitting into an inning-ending double play in the fifth.
"I was frustrated earlier," said Mathis, who's batting .160 with runners in scoring position this season. "I had a chance to push a run across and was not able to do it. ... I had another opportunity, and luckily, got it done."
The Astros (42-61) have lost seven of 10, over which their starting pitching has posted a 5.88 ERA with a .365 opponent average. Offensively, they've hit .224 in that time with one run scored in their last two games after scraping together three hits in the series opener.
Houston sends Jarred Cosart to the mound with hopes of him correcting the club's recent struggles and also reaching what has been a rare milestone for Houston pitchers in recent seasons.
Cosart (9-6, 4.23 ERA) is out to become the first Astros pitcher to 10 wins since Lucas Harrell won 11 in 2012. No one on the staff had more than seven victories a season ago.
The right-hander's first attempt at reaching double-digit victories ended without a decision after allowing four runs -- three earned -- and seven hits in five innings of Sunday's 11-7 win over the Chicago White Sox.
"Obviously I didn't get the results and didn't go as long as I wanted to, but I thought I made some good adjustments to start the second half that I can only build off of and get better," Cosart told MLB's official website.
After a strong June, Cosart is 1-1 with an 8.04 ERA and 2.23 WHIP in three starts this month while three interleague starts this season have resulted in a 2-0 record and a 2.84 ERA.
He's never faced Miami, but Jarrod Saltalamacchia is 2 for 2 against him.
The Marlins hope to keep winning behind Tom Koehler, whose last outing didn't earn him a victory, though the right-hander held Atlanta to a run and five hits while striking out seven in 6 2/3 innings of Monday's 3-1 win.
Koehler (6-7, 3.85) has struggled against the AL with a 2-2 record and 5.54 ERA in seven career starts, though he hasn't faced Houston.
Miami's Jeff Baker has hit safely in each of his 10 July games for a .444 average.