Raley went 2-3 with a 4.78 ERA in 58 games with Houston this season. The 33-year-old struck out 65 and walked 16 in 49 innings.
"I just feel like there's more in the tank, and I want to grow as a player and as a person and I thought Tampa was a perfect fit for that," Raley said. "I felt like we found common ground and made it all work."
In four major league seasons, Raley is 3-6 with a 5.62 ERA in 93 games and has 122 strikeouts over 107⅓ innings. The left-hander appeared in 14 games in 2012-13 with the Chicago Cubs and spent 2015-19 in South Korea before returning to the majors in 2020.