Manager Scott Servais also said he didn't expect Hernandez to miss any time.
Hernandez allowed five hits -- including home runs by George Springer and Carlos Correa -- and was trailing 2-0 when he didn't come out for the start of the sixth. He'd thrown 65 pitches and struck out six with no walks.
The 30-year-old was making his 10th Opening Day start and ninth in a row -- the longest active streak in the Majors.
Hernandez came up limping after being late getting over to cover first base on a groundout in the fourth inning and hit the base awkwardly. Servais and athletic trainer Rick Griffin went to the mound at that point, but Hernandez stayed in after throwing a few practice pitches.
He then retired the final batter in the fourth and threw a 1-2-3 fifth, punctuated by an inning-ending punchout of Springer, but Nick Vincent replaced him in the sixth.
The six strikeouts moved Hernandez past Roger Clemens into fifth on the all-time Opening Day list with 73. He's now 6-2 with a 1.76 ERA in his 10 Opening Day starts.
Before tweaking his leg, Hernandez was bit by the long ball. He'd only surrendered three homers in 66 1/3 innings in his previous season-opening efforts, but gave up two in the first four innings Monday.
Though he's looking to work more up in the zone with his fastball this year, the six-time All-Star threw a 2-1 heater to Springer that he was trying to locate down and away, but instead ended up in the middle of the plate. Springer didn't miss, launching a home run projected by Statcast™ at 389 feet into the friendly left-field porch at Minute Maid Park for the 10th leadoff homer of his young career.
The other homer by Correa -- a projected 459-foot blast, per Statcast™, that just stayed fair down the left-field line -- was simply a good piece of hitting, according to Hernandez.
"One mistake," he said. "The one to Springer. The other one was a a good pitch. I have to tip my hat to Correa. That was a good pitch. Unbelievable. He put a pretty good swing on it."
Otherwise, Hernandez and Servais felt all was good against a very strong Astros lineup, at least until his leg gave way.
"I was throwing a lot of strikes. That's the key," Hernandez said. "I was getting in good counts and making good pitches. I feel really good about the outing."