Martinez was born and grew up in Sierra Vista, Arizona, and attended Sunrise Mountain High School, where he played baseball and golf.[1] Over four varsity seasons, he posted a record of 19-4 with a 2.86 ERA and 172 strikeouts over 144 innings.[2]
Martinez played college baseball for the Arizona State Sun Devils for three seasons. He pitched both as a starter and in relief as a freshman and began his sophomore season as Arizona State's mid-week starter before being made the team's number one starter after seven starts.[3] As a junior, Martinez went 9-4 with a 2.75 ERA and 94 strikeouts over 111.1 innings pitched and was named first team All-Pac-12 Conference and a second team All-American by Louisville Slugger.[4]
On December 10, 2020, the Houston Astros selected Martinez in the minor league phase of the Rule 5 draft[6] and assigned him to the Triple–A Sugar Land Skeeters to start the 2021 season. He was called up for his MLB debut on September 20, 2021.
Starting the 2022 season by hurling 17 scoreless innings with the Astros, Martinez took on a role as a long reliever. He posted a 2.48 ERA over 32+2⁄3 innings through August 13, 2022, prior to a demotion to the Sugar Land Space Cowboys,[8] On August 25, the Astros recalled Martinez from Sugar Land.[9] Martinez earned his first major league win on September 15, after tossing a scoreless inning versus the Oakland Athletics.[10] In 2022 with the Astros, he was 1–1 with a 2.09 ERA in 29 games covering 38+2⁄3 innings.[11]
In 2024, Martinez pitched in a career-high 44 games with the Astros, going 3–2 and yielded a 3.59 in 52+2⁄3 innings (also a career high), with 14 games finished, 1 save, 36 strikeouts and 1.272 walks plus hits per inning pitched (WHIP).[11] He also made 13 appearances at Sugar Land in 2024, with no decisions, a 1.46 ERA (2 runs in 12+1⁄3 innings), 6 hits, 7 walks, 12 strikeouts and 1.054 WHIP.[12]