Sporatic inability to start vehicle. Turned key in ignition, no response (no starter sound, like dead battery response except lights, radio, etc all work). Let car sit for hours, then it starts immediately like nothing is wrong. Also noticed after an episode that the key wouldn’t unlock car. Returned later, unlocked car w/ same key and car started right up???
Assuming the battery is not the problem (you might want to have it tested to be sure), check the battery cable connections (positive and negative) and also at the OTHER end of both battery cables. If any of the connections, including ground, is loose or dirty it could cause this problem.
I also have a 97 Nissan Maxima. Recently I had to have the ignition switch replaced because it was getting worn out after 122,000 miles. The Nissan tech who replaced it said he had replaced several of these switches over the years. It took him about 30 minutes to make the repair – no problems since.