I've had this happen several times too. Once I understood and certainly didn't think any compensation was due - a wind storm set the alarms off two nights in a row. Another time there was no explanation and a lot of angry people at checkout. I didn't hear anyone get any form of compensation and after that I didn't ask. I haven't been back to either of those hotels though and probably never will return.
It's a tough one. If kids in the hall pull the fire alarm, should the hotel now have to buy everyone breakfast? I'd say no. If maintenance decides to play around with the alarms at 2 a.m. then, yes, I think they should take responsibility.