I can't tell your car model from your Avatar but since you posted this the E46 section, I would assume it is an E46, try this simple solution.
Try disconnecting the bonnet switch. It is a plunger type switch. On the E46, it is located in the engine compartment on the firewall driver side I think.
I had the same problem on my E85 which is essentially and E46 in drags. The alarm keeps going off even when no one touched the car. Disconnecting the switch seems to cure the problem on mine. When I reconnected it, the problem came back. I now leave it disconnected. It seems that it is a known problem with the E46.