Does it happen after it has rained or the car has been washed?
The e36 with automatic (hydraulic) tops have diagnosable control modules. I'm thinking that the problem relates to part of the harness getting wet (or corrosion due to being wet in the past). Mis-installation of tops and leaky seals around brake lights can do it....
best, whit