I had a corvette once with the same problem after replacing a starter. It seems the new starter developed a condition known as heat-sink. this would cause the starter to not engage because the starter was hot. I've seen mechanics tap the starter with a wrench when this condition occurs. Sometimes it works, sometimes not. I'll bet you any amount of money it's your starter "heat sinking" as they call it. A replacement starter may be what you need. People usually don't think of this when this type of thing happens. They start barking up a wrong tree tearing everything apart to find the problem. Since it starts when it's cooled off a bit, i'll bet that's what it is.
First, is it not starting when it cranks or it doesn't crank?
The heat soak problem is the result of the resistance of the solenoid coil increasing due to heat. This starter is not known for this problem. Added resistance in the fender solenoid or corrosion in wires could cause this.
More common is it cranks but doesn't start. This is caused by fuel leakdown caused by an injector, fuel pressure regulator or pump check valve. Loss of pressure causes a bubble o form in the fuel rail that has to be flushed out. This causes hard starting but not a failure to start.
Lastly it could be an electrical problem. Likely is the crank sensor which is cheap and easy to replace.
Thanks for your suggestion that it is the starter. Unfortunately it cranks fine for as long as i would ask. The battery is new 1 year old. The problem of not starting when left hot for 5 mins or so is someting else to do with the engine/egr/vacuum/fuel or something . The problem i first noticed on a hot day lust summer O3 when it failed to start after going into bank during lunchtime. I called AAA for a tow. When the truck arrived after say 50 mins the driver tried to start it and it did not for him also. So it is not user trouble! Put it on flatbed drove 10mins to their garage and their mechanic tried before unloading from flatbed and it started first time! They said unless fault was present it would be difficult to find. I drove all last winter 10,000 miles no problem. This summer it has happen twice both times going to the post office. Again leaving a hot truck for 5 mins or so then trying to start it. What i have fond so far to cure this is to wait one hour for the engine to cool or the vaccuum fuel or something to go back to cold start condtitions and it always starts first time and runs perfeclty. The second time it happened a work collegue suggested to remove the fuel filler cap to release any pressure. I did this and it did not start. Only thing so far is to wait 1hour.
What other engine components do think could do this?
See OHW's post, he offers some excellent advice. As he states, the first order of buisiness is to decide if it's spark or fuel related. One way to determine this is to remove a spark plug ignition wire from a plug when it is in a no start condition. Place an insulated screw driver in contact with the connector and see if a spark to a ground can be observed through sight or sound. NOTE: Be careful, if the ignition is working and you provide the ground through your body this will light up your life in a rather painful manner. Also, have you tried to pull the codes to see if there is any failure stored in the permenant memory?
I would also listen to hear if the fuel pump comes on for about 3 seconds. Pump current can be easily measured at the fuse 4-5A. Also, when you turn the key, the check engine light comes on. This will indicate that the computer is being powered. The PCM relay has a diode in series with it to prevent powering the computer with a reversed battery. This looks like a black fuse in the power distribution and it can be switched with the AC one next to it. Only heard of two cases of these mysteriously going bad. It takes time, but the problem has to be defined first.
The check engine light does come on when key turned for regular starting, but I must admit i did not check to see it comes on when it does not start hot. Today I was looking at the scan tools data to see if i could notice anything when the fault was there. As the scanner was giving data during cranking I would think that that must indicate the PCM was powered. I tried a number of times cranking today and it mostly did not fire. After one try it did run badly for a few secs or so but low revs and stopped. Again left it for 1 hour and it started instantly! I will check PCM and Fuel pump relays tomorrow. I will remove them and inspect. If i could get somwhere a can of freezer spray then cooling these would quickly show that they have the temp promlem. I may go to Home depot as I think you can get freezer spray in plumbing dept to freeze water pipes during repair. What engine parameters should i look at to try an narrow down this fault?
I would be careful with spraying electrical components with the the super cold liquid from a can of compressed air. The extremely small traces in electronic components can't handle those extreme temperatures and will break internally. If you do use it, don't spray the liquid directly on it, just the cool air resulting from the liquid evaporating, keeping a good distance.
Every hot start problem I have fixed was because of a failed coil or, if it is fully electronic like it is on the Explorer, the ignition module. On some Fords, there are more than one ignition module (one on the side of the distributor and one for high voltage generation). On the Explorer, which doesn't have a traditional distributor, I would check the high voltage module that the spark plug wires connect to.
Don't be fooled by the presence of a spark. Even if a spark exists, it might not be enough to ignite the fuel. The spark should be bright blue/white. If it is yellow, orange or red and can't jump at least a half and inch, it is too weak.