2000 Mazda Miata Not Starting on Intermittent Basis

I recently bought a 2000 Miata–23,000 miles, in great shape–I thought. Two days ago, after driving it for most of the day, it wouldn’t start. Turned on but not over. Called tow truck; by the time he came, it started. Mechanic put in a new battery; said voltage was low on the original. A day later, the same thing happened; wouldn’t start after driving half the day–started up 20 minutes later. Mechanic can’t find anything obviously wrong. Any thoughts? Could it have something to do with heat? Rain (this began after the car sat out in a heavy rain).