Probably electrical.
The book method is duplicate the problem or wait until it dies completely, then it can be found easier. Wiggle test is good too as stated, don't overlook the harness that is inside the conduit at the back of the engine bay.
Lacking that:
Power and ground, ignition and fuel.
There are a million things a guy could look at, but with no check engine light the first things I would guess at would be either bad power/ground to the ignition or bad power/ground to the fuel pump.
Make sure your underhood grounds are good. They're probably fine. Next I would disconnect the battery, pull the cover off the underhood fuse box, unbolt the fuse box, and flip it over for a look. None of the connectors on the underside of the box are weather tight (which I really do not like), and they like to corrode. I've found them hanging by a thread/one or two strands of wire before.
Keep in mind....the power for everything goes through that fuse box...if anything is the slightest bit corroded, it'll act up like you're saying. Many grounds go through it also. Sometimes the fuse box corrodes internally too...
There is a connector/plug underneath the driver's side footwell area, that the fuel pump power and ground travel through. It is often corroded to the point the connector won't even pull apart. I had to soak mine in penetrating oil and gently work it back and forth for like half an hour.
Related problem with the plug under the driver's footwell area.....the fuel pump ground is goofy...it goes from the gas tank, all the way to the back of the truck (!), and then it goes all the way to the front in the engine bay (!), making that wire about a mile and a half long. Being that small wire gauges are the norm, that wire tends to get hot....which makes it corrode more than normal, etc.
Fuel issue won't cause a check engine light, ignition often will (unless it's a clean cut to power or ground) so if I was looking at it I would probably be looking at fuel first. If you could rig up a fuel pressure gauge and keep an eye on it when it acts up, that would give a good clue.