Ditto the above suggestion...one of the most common false alarm triggers for the e39 & e53 is the hood sensor. Both are located in about the same place (just on opposite sides of the engine bay):
The hood sensor is
S19 in the image below...located on the right side of the engine bay (perspective is as if sitting behind the steering wheel)...pull its electrical connector
X161 then watch for the next few days if the false triggering of the alarm stops:
Not sure what model year your e38 was...but BMW changed the IMS (interior motion sensor) from the
FIS type... to a
UIS (Ultrasonic) type...which helped "quell" the false alarm triggers from the IMS.
1996-1999
1999-up
