If it is the clamp that's popping off shim it or file the slot/opening out a bit so when it clamps it is tighter (you could replace the clamp but shimming it is by far the simplest, cheapest and easiest thing to do), if its the actual terminal of the battery that is at fault I think your only option is to replace the battery.
+1
30 sec fix tops, slacken the clamp, find a bit of anything-to-hand to take up any slack on the terminal where the clamp wont meet and you're sorted, there'll still be plenty of contact. I had an Isuzu Trooper that spent most of its life with a bit of [insert whatever you like] jammed in the clamp and tightened.
If however the clamp
is tight, it's possible the terminal itself is loose in the battery in which case, as above, new battery.