Brewer agreed to a three-year deal worth $23.4 million, sources said.
Beverley's agreement, meanwhile, is for four years and $23 million, his agent said, according to The Associated Press. The first three years and $18 million are guaranteed, with the team holding a $5 million option for the fourth year.
"I think if we can keep our group together and stay healthy, we can win it all," Brewer told ESPN.com. "I'm just happy as can be. So glad to be back for three more years."
Beverley, one of the better defensive point guards in the league, was highly regarded by several teams and was close to reaching an agreement with another in the Western Conference, according to a source.
When the season ended, all three wanted to return with the hopes of pushing the Rockets to another deep playoff run.
Brewer, 29, emerged as a key contributor in Houston after the Rockets acquired him via trade from the Minnesota Timberwolves in December. He averaged 11.5 points during the regular season, and then in the postseason he had seven games in which he scored 15 or more points. Brewer scored a career playoff-high 22 points in Game 4 of the Western Conference first-round series against the Dallas Mavericks.
The Rockets liked Brewer's veteran leadership and his ability to defend guards and put pressure on the opposing defense with his quick driving style.
In an eight-year career with the Timberwolves, Mavericks, Denver Nuggets and Rockets, Brewer has averaged 10.2 points and 1.4 steals in 25.8 minutes per game.
Beverley, a restricted free agent, missed the final 16 games of the regular season and all of the postseason with a torn ligament in his left wrist.
He is expected to fully recover before training camp. Toward the end of the postseason, he was shooting jumpers with a cast on his wrist.
The Rockets had expressed a desire to bring Beverley back to the team regardless of whether they upgraded the guard position.
While he wasn't the best shooter from the perimeter, connecting on a career-low 38.3 percent from the field, Beverley was a solid defender. Opponents shot just 32.1 percent against Beverley from 3-point range during the regular season and 35.6 percent from beyond 15 feet.
In three seasons with the Rockets, Beverley has averaged 8.9 points, 3.5 rebounds, 3 assists and 1.1 steals per game.