I've only had the car for a month, and still getting used to all the gizmos on it, but just recently the tailgate window pops open when you turn the ignition on...you have to get out, close it, and off you can go!
Check inside the tailgate as some times water can leak in causing issues if it gets over the electrics, IIRC water can leak under the rear spoiler and if it's anything like a e46 then steam cleaning around the rear glass is a big NO NO as it can get past the rear wiper motor shaft seal
Wheezer, I had exactly the same problem. I bought a 2005 525i E61 a few weeks ago, it was fine when I bought it and I drove it home 120 miles with no problems. Last week it started releasing the luggage cover and popping the tailgate window when I put the ignition fob in, at 1 point the release mechanism just kept on clicking and I couldn't even jump in quick enough to lock the thing down. Every morning it would also display an excessive battery discharge message and require the clock to be reset to the correct time, I've had the battery tested and it's fine.
A few days ago the problem just went away all on its own!
I've been told there were a lot of problems with the software on cars from this period and it may just need a software update. The car is a 55 plate listed on the log book as December 2005, I'm getting a diagnostic download done on it next week.