Doesn’t help now, but the Marriott at IAH between the B and C terminals is on airport property, so you wouldn’t have had left the airport if you stayed there.
Did you actually try to your check in on the morning of your originally scheduled flight, or had you already decided to return to Sacramento w/o trying? If you tried, what did they say? Those agents might be better versed at requirements for the Costa Rica flights than the agents at night.
This says up to an 18-hour layover in a non-approved State is allowable, as long as one does not leave airport, but it may not be definitive.
https://cr.usembassy.gov/covid-19-information/