My '03 Sierra has this issue; I've been working on it, but haven't resolved it, yet (to which you may think... "so, what good is the info you're giving, below?" LOL... that's fair.)
With mine, when it happens, it'll immediately start on the second crank attempt (no pedal).
(also, btw, I had replaced my crank / cam / oil pressure sensors earlier, as part of another project... no change / improvement). If you replace the crank sensor, btw, you're supposed to do a crank position relearn sequence as part of the replacement.
There's some differences between our two trucks; fuel filter & fuel pressure regulator were moved to the pump assembly on yours; also, the fuel system was made 'returnless' (you only have one fuel line at the intake manifold; I have a second that goes back to the tank).
The pump has a check valve, which prevents fuel pressure from bleeding off too low between starts, and it's in the pump assembly as well. As a test...
- From a cold start, turn the key to 'on' for 5 seconds. You should hear the pump activate (good idea to kill the radio / hvac fan while doing this). After 5 sec, it'll go quiet. Key off.
- Wait a couple of seconds, and repeat (key on, listen for pump activation). When the priming cycle stops, crank the engine and see if it starts on the first crank.
On yours, you can't test / replace the FPR without replacing the entire pump assembly. Same for the filter.
Hook up a fuel pressure gauge (you can rent them) to the test port (RH / passenger side of fuel rail). Run the engine, shut it down, and check the resting fuel pressure. It should generally be in the low 40lbs or higher; if it bleeds down into the 30s or lower (either immediately, or after a few minutes or longer, that's considered too low to reliably start the engine.) If you see this, it's a good indicator the check valve is bad (not uncommon).
Before replacing the fuel pump (lots of work), swap the fuel pump relay with one of the others in the underhood fuse box, and see if the problem lessens / goes away. It's a lot cheaper / easier to replace this relay, over the pump.
This relay is the same as a couple of others in the underhood box, so if you just decide to buy one / try it, and the existing ones were still good... you'll have a spare, and won't be stranded on the side of the road someplace).
Notes on replacing the pump...
(and there are videos a-plenty on doing this... Briansmobile on You Tube has a good one, using the 'bed tip' technique.)
First... relieve the fuel pressure. Start the truck, pull the fuel pump relay, and the engine will stumble to a stop about 5 seconds later. After the work is done, it's better on the starter / fuel pump if you prime the system to re-pressurize it, before cranking the engine (see above).
If you decide that the fuel pump is the culprit, you have the choice of tipping the bed on the driver's side, or dropping the tank. I've done both; I personally prefer the tank drop (with two floor jacks, it's not too bad.) Try and do it with 1/4 tank of fuel or lower. You do have two metal retaining straps to disconnect; the bolts can rust in place / break off. Replacements are available, if needed. If you live in the salt belt, put your penetrant of choice on those bolts at least a day before attempting to remove them. 15mm bolts, IIRC.
If you go to tip the bed, you have 4 bolts to remove on the driver's side, along with disconnecting the filler neck (and the ground strap!). On the passenger side, loosen the opposite side bolts almost all the way, but don't remove them. Once the bed is lifted, you have to be a bit of a contortionist to squeeze in between the bed and frame, while working on the pump retaining ring / connections. Oh, and get a new metal retaining ring. The old one will be rusted in place. There's also a plastic lock tab on it that needs to be pushed in, once you get the ring to start moving (counter-clockwise to loosen).
If you have an engine hoist or similar, definitely hook it up to the driver's side of the bed. Even so, you'll want to brace up that side with 2x4s, etc., to prevent it from falling. Because if it does fall with you in between, you'll be seriously hurt, or even killed.
If you have a friend or two, and room, you can just outright lift / slide the bed back (or off). This is by far the easiest option, but it's tough to do if you don't have help; the bed weighs a couple of hundred pounds. Again, you'll need to disconnect the fuel filler neck and ground strap... and you'll also want to disconnect the 4 plugs from the main harness connector at the back of the bed, on the driver's side. Removing the tailgate beforehand saves some weight, before lifting the bed.
If yours is the original fuel pump, you may have to rewire the connector (it's still 4-wire, but the old style is a 4-inline plug; GM went to a stacked 2-on-2 plug after '03). Most kits for trucks around that timeframe supply the new style plug / pigtail, to wire into the circuit. I think (?) the wire colors are the same, but check. You may be spared having to do this, since yours is an '05.
As far as pump brands... the Carter pumps are 'made in USA', but tend to fail.
The GM (AC Delco) and Bosch pumps are generally regarded as the most reliable. The AC Delco, especially, is pricey. Bosch used to supply the OEM pumps for GM, so if you can find one significantly cheaper, it's as if you replaced with an ACD, anyway.
Moving on from the pump, if the existing pump / relay test out good... prevailing wisdom next checks the EVAP valves / solenoids, along with the charcoal canister (next to the fuel tank). The purge valve is a green-shaded object on your intake manifold (my '03 has it at the front of the intake; yours is likely on the D/S of the manifold.) Your purge solenoid is near the charcoal canister, if you have one (my '03 doesn't, but I have the 6.0L; if you have the 5.3L, you'll likely have a solenoid.) What you're checking for here is a blockage; you can disconnect the plastic tubing at both the tank and manifold ends, and see if you can get air through it. With the charcoal canister, if you find that it's blocked, you can sometimes run compressed air through the inlet / outlet, and get it at least partially unblocked. (Note - If you've had problems filling the tank, with the gas nozzle / pump shutting off constantly, you may find this situation resolved / improved, as well).
In order to test the valves / solenoids, you'll need a high-end scanner to activate them (like a GM Tech2, or similar).