Let me cure your pain guys. I had the exact problem for the last 2 years with my '01 F150 5.4L Lariat. It got so bad it was becoming a flip of the coin whether the truck would start or not. Sometimes easy; other times, I had to let the truck sit for up to 3 hours. The problem drove me nuts ! Two days ago, I let the truck idle from 12:30 pm until 5:15 pm because I was afraid it wouldn't start again.
So, what was the problem ? The fuel pump. I took it into the dealership yesterday, and fortunately, the mechanic had seen the problem before. He keyed the engine numerous times while checking fuel pressure, and he had a couple incidents where there wasn't any. He verfied that power was getting to the pump, therefore, it wasn't a relay or relay driver. He also said that a defective pump will not hold pressure on the gas line like it should when the pump is off; therefore, even if the pump spins up, there is no pressure against the injectors initially when a user quickly turns the key to engage the starter. That explains why I usually had some luck starting the engine if I at least held the key on for a few seconds before engaging the starter: the fuel pump, if it would turn, would re-build the lost pressure.
I can't guarantee that the fuel pump is your problem, but my symptoms were the same as described here. I haven't had the truck back but a day, but I drove all over and I must have started it 20 times today. No problem. Good luck, I hope this helps.
Steve, Maple Grove, MN