Hi. My name is***** Thank you for your question. I wouldn't be overly worried about that situation. He should be just fine. If you want to think about this situation, it will help you to feel better about this. If he as a stray cat outside on a 37 degree Celcius day, he should be fine as long as he's in a shaded area, has ample access to water, and isn't over stimulated. Stray cats are out in those temperatures all the time and they can be just fine as long as these conditions are met.
That is good that he's got that water available. Honestly, I wouldn't be overly worried that he'll overheat in that temperature in your house. He should be just fine.
I'm glad he found you! Give him a good petting for me when you get home!