I have had a nagging problem with my Scag Turf Tiger with 27hp Kohler. When it gets hot it will not turn over. When turning the key, I can hear it click but it will not turn over. Checked all the safety switches and at one time I thought it was fixed because I put a new switch on it. The problem was solved for a while but then returned.
You can wait until the next day when it cools completely down and it starts up fine.
Mine did something like that...the PTO switch was going bad. In my case, when I get done mowing, I pull up by my garage so I can blow all the grass off with my leaf blower. I typically leave the engine running at idle when I do this. Well, when the switch was bad, after I stopped the mower, pulled the brake, and opened the handle bars, and stood up, the mower would die. It took me awhile to figure out that if I simply operated the switch a few times, the mower would start. But eventually the switch completely failed.