Both of the suggestions above are good and both need to be done based upon the mileage of your truck.
What is happening is that the high pressure oil pump cannot build enough pressure to fire the injectors until the oil cools down enough to lower the viscosity. As the oil heats up, it gets thinner and if you have any questionable o-rings on the IPR or injectors, it squeezes by and won't allow enough pressure to build. The injectors need 500 psi to fire.
I like to make one fix or mod at a time so that I can analyze how it affected the performance of my truck. If you do two or three things on a Saturday, you probably won't be able to determine which had the most effect, or maybe had none at all. That being said, I would replace IPR o-rings first as it is the simplest of the two operations and will probably allow your truck to start when hot.
The link above concerning IPR o-ring replacement is excellent, and I used it when I did mine a few weeks ago. The link suggests to weld a piece of bar stock to the end of the large socket and I found that to be cumbersome. I took an extra 3/8" drive, standard depth socket and welded to the back of the large deep socket so that I could use a ratchet and extension on it. This worked well.
Also, I couldn't figure out how to get the IPR out without removing the fuel filter canister and fuel regulator. You can read up on this site about how to do that. It's a good opportunity to replace the rubber fuel hoses and clean out the fuel canister.
If you have all the tools, hose, hose clamps and o-rings, it will take you about 6 hours to do the work the first time. It will only take 2 hours if you ever have to do it again.
Good Luck,
James