BMW E34 1995 Sport Auto 525i

Problem:- Occasionally, once/twice a week having arrived somewhere and switched off car. Locked it, popped into somewhere and gone back to car, unlock it, get in and it won't start. Lock it and leave it for half an hour, then unlock as usual and it starts!

It sounds like a flat battery, it doesn't try to turn over though and the battery is fine. I wonder if it might be something to do with the immobiliser/central locking system. It's almost as if it is shutting down because the immobiliser thinks someone is trying to steal it!

Help - any ideas before my wife kills it!!