Altuve, who went 4-for-6 and scored four runs, homered in the eighth inning to complete the first cycle by an Astro since Brandon Barnes accomplished the feat in 2013.
Alvarez and Jose Abreu also went deep for Houston, which put together a six-run sixth inning en route to its third straight win.
Kendall Graveman (4-6) earned the win in relief of Cristian Javier, who lasted four innings after allowing four runs on six hits and six walks.
Jose Urquidy earned a four-inning save.
Masataka Yoshida went 3-for-3 with a double and three runs, Adam Duvall homered and top prospect Ceddanne Rafaela recorded his first major league hit for the Red Sox, who have lost three of their last four games.
After Boston starter Chris Sale struck out six across 4 2/3 innings of three-run ball, reliever Kyle Barraclough (1-1) allowed 10 runs on 11 hits in 4 1/3 innings to take the loss.
Javier got two outs in the first before Boston loaded the bases and took the lead on Triston Casas' two-run double.
Houston cut its 2-0 deficit in half when Abreu led off the second with a homer, but right fielder Alex Verdugo robbed Yainer Diaz of a hit with a diving catch later in the inning to prevent the Astros from mounting a rally.
Altuve led off the third with a double and scored on Alvarez's game-tying single.
In the fifth, Altuve came home on Sale's two-out wild pitch after hitting a leadoff single.
Duvall erased Houston's lead with a two-run shot in the bottom of the frame.
The Astros broke the game open in the sixth. After back-to-back walks, Altuve hit a two-run triple with one out.
Two batters later, Alvarez lifted a two-run homer to right-center field to increase the visitors' lead to 8-4. Diaz plated another run with a single.
Houston then added two runs in both the seventh and eighth.
Connor Wong hit a two-out RBI single in the Boston ninth.
—Field Level Media