An irritating automotive mystery

An irritating automotive mystery. Suddenly at 1:30 AM our car alarm goes off. I went out and turned it off. It went off again. And, a few minutes later, again. I tried getting in, starting the engine, shutting off the engine, and locking the doors. No good.It would go off every couple minutes, so matter how many times we sent the signal not to. This is a serious matter in a rowhouse neighborhood, where you could wake up all your neighbors. Finally I had to disconnect the battery. No idea why this happened. The car had not been driven in 24 hours, so if it underwent some mechanical change (like a wire coming loose) it did so without the car being moved. It is true we were in an accident with that care about 6 weeks ago, and the battery was temporarily jostled, so that it required me to bang on the connection a couple times. But no problem with the alarm. Why would such a thing only manifest itself weeks later?
Tomorrow I shall either have to have the alarm fixed or disconnected. Insurance companies seem to require them. They of course are absolutely useless in preventing theft. Their only legitimate use is for finding the car in a large parking lot or garage. Back before cars had such things, we managed.