Try cleaning your battery posts and cable ends, it sounds like they are getting dirty and losing contact. Put a bit of grease on the posts before you put the cables back on, this will help to prevent corrosion in the future and give you good electrical contact.