Little confused (normal) first you say its a hot start problem, then later it's a cold start?
Umm, basics first. Is it a 4.0? Do you have the basics when it won't start? Spark and fuel?
If it's a hot restart and a 4.0, make sure after checking you have adequate fuel pressure, that all the insulators are in place around the injectors. The 4.0 had a problem with heat from the intake causing the fuel to boil in the injectors. Made it a bugger to restart hot. Had to crank and crank till enough cool fuel got to the injectors to let them work properly.
Also on hot restart problems, is the fuel pump running? You could have a problem with the fuel pump relay sticking when hot, and/or even the pump hanging up when it's hot.
Swap the fuel pump relay with one of the other ones and see if it makes a difference when it acts up.
If it's a cold start, basics again, before you even try and start it, see if you have fuel pressure. No pressure, sounds like your fuel pressure regulator is bad.
And the fuel pressure regulator is NOT the fuel filter. Regulator sits on top of the tank, filter is in the tank on the bottom of the fuel pump.
Takes care of checking for fuel.
As for spark, does it have it when you are trying to start it?
Could be something as simple as the CPS starting to go on you, or maybe even the ADS relay hanging up.