You say you checked for spark and fuel, which is good. But did you check to see if you were getting "enough" spark and fuel? If it will sometimes start and run when warmed up, it should be getting both...but you need to determine how much. Easiest to check is probably fuel pressure. Could be an issue with the fuel pump, filter, pressure regulator, or in a case like mine a few months ago...the tank had some gunk in it and the sock (on the fuel pump) was clogged.
Best way to check fuel pressure is with a gauge. You can buy a basic one for around $30...maybe less. You can also use the free rental deal at the parts stores. Easy to do. Just follow directions and see what kind of fuel pressure you have. If you don't have a gauge available, see if you have any luck getting it started with a little starting fluid sprayed down the intake. If it fires right up and immediately dies or idles down, you might suspect low fuel pressure.
As for spark, you can check quickly like most people do it. Just pull a plug wire and hold it near a metal ground while you buddy cranks the starter. If you see a spark, you know it's working...sorta. Yes, there's a spark, buy you already know you're at least getting some spark because it starts occasionally. Get you a spark tester. Last one I bought was around $10, I think. It will allow you to see what the spark looks like. Are you getting a consistent spark every time, or is it only occasionally hitting? It will tell you the intensity, as well. They make some with a gauge built in so you can see how hot the spark is.
Also, it might be helpful to know that some ignition parts such as coils, control modules, pip sensors, etc tend to work better when cold and then start breaking down with heat (after driving/running for a while.) Not saying you should rule them out, but just another clue to keep in mind.
If everything in the spark/fuel systems check out good, you can check the timing. Although, in my experience, timing issues usually have some backfiring or firing through the intake symptoms. If you have spark and fuel, those are going to ignite something eventually...regardless of whether the timing is off!
If all of that stuff check out ok, then it's probably time for a compression and/or leak-down test. That would actually make sense, the way you describe it. Some compression issues can improve temporarily as the engine internals heat up and expand, which helps to seal off the combustion chamber.
Good luck and keep us updated.