As Michael noted, the solenoid could be the culprit. The fact that you charged the battery overnight, and it still did not work until you hit it with a hammer, tells me heat soak is not the problem. Your starter was cold when you tried to start it the next morning. Next time it does this, hook up a battery charger to it and try and start it. Your trickle charger will not work for this. You'll need a charger with a "Start" setting to give it enough power for this test. If it starts, I'd look for a shorted battery. Most of the chain auto parts stores will test a battery for N/C.
If it does not start, hit it with a hammer again to see if you can repeat the earlier event. If it starts again this time, a bad solenoid/starter is indicated.
let us know what you find.
rb6667