I have a friend with a 2002 Jeep Cherokee, V6. Battery was replaced about a year ago, starter shortly after that. The Jeep is garaged. A couple of months ago, in the morning, they went to start the vehicle and it was totally dead, not dashlights, no cranking. Flipped the key off and on a couple of times and on the last try, it started just fine, full cranking power. Everything is ok until this week. Same thing occurs. I should mention that clock, radio and everything at back at the factory defaults after these events, like the battery cable was removed. I suspect it is a bad ground somewhere but I’m not sure where to find it. Do these Jeeps have a history?
I would suggest having a good mechanic check this out with his trusty ohmmeter. I would attach a new ground strap from the engine to the frame in any regard. A lot of vehicles have these straps from the factory and they are a great backup for future electrical problems.
When a vehicle sits for a while, it is not all inert. So missileman is onto something, but replacing the ground strap is maybe too much, first clean the battery ground post and terminal lug. If that does not do the trick, then you might want to test the ground strap for continuity and resistance. If it fails there (should be about zero ohms) then replace it. Oh yes, check the end that connects to the frame/chassis. Also check the strap from the block to the frame for good continuity. The other possiblity is the stater switch could have poor contacts, worn or with a patina that has bad continuity.
The trouble could be with the ground wire but it also could be the power wire from the battery. Clean both of the battery leads and posts using a battery post cleaning brush. If that doesn’t clear the trouble then check the wire that goes from the battery to main fuse panel under the hood for a bad connection.