Sweeney put Chicago ahead to stay with a second-inning RBI groundout and capped a four-run outburst in the third with a run-scoring double.
He also drove in a run with a fifth-inning two-bagger and capped his big day with a three-run homer in the seventh as the Cubs took the rubber match of a three-game interleague series.
Anthony Rizzo went 3-for-3 with a two-run homer, four RBI and four runs scored while Nate Schierholtz added three hits for Chicago, including a two-run single.
Jeff Samardzija (5-7) earned the victory, allowing four runs on nine hits over seven innings. The right-hander didn't issue a walk and struck out five.
Jordan Lyles (4-2) was lit up for eight runs (five earned) on 10 hits over five innings for the Astros.
Houston's Chris Carter went 4-for-5 with two RBI.
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards
Charlize Theron not engaged to Sean Penn 'yet'