The center-power forward averaged 1.7 points and 1.8 rebounds in 29 games for Toronto last season.
The 10-year NBA veteran also has played for Houston and Sacramento. He has career averages of 3.7 points, 5.0 rebounds and 1.2 assists.
The 32-year-old Hayes went undrafted in 2005 after four years with Kentucky. He was taken in the NBA D-League draft and eventually signed with the Rockets in January 2006.
The team announced the move Monday.