Most likely the crank sensor as said. Sometimes throws up a fault code and also occasional limp mode as it gets worse (when you're booting it usually). If the battery is getting old this can also cause hot starting problems, as can the starter motor. These two issues are related to crank speed as there's a minimum rpm for the ecu to enable fuel injection. When hot the starter motor can give slow cranking speeds (as can the battery).
Thermostat wouldn't cause the hot start problem as it's purely mechanical so nothing to report to the ECU, although the temperature sensor possibly sensing incorrectly could be causing problems. However, the temperature is a red herring as it's usually the crank speed which is critical when the coolant temperature is above 70°c.