I chased this on my LR3 as a hood latch sensor for a long time. I used the shorted out pins hack... seemed to work for a while. Then didn't. So I replaced the sensor (which is very easy to do). Originally it may have been the hood sensor, but then it was clearly something else...
...started happening again. After a lot of investigation and trial and error, it ended up being one of my rear door sensors. I had to really slam the door to get it to close good and I think it would sometimes relax just enough, based on temps or random acts of God, and my alarm would go off in the middle of the night. I usually keep my car unlocked in the garage so I never noticed it, but started to see evidence of this happening at work and also hear it when on vacation with the LR3 parked in the driveway as it woke everybody up in the middle of the night.
I never had issued locking my car or had errors about doors ajar. But that was it.
It was a door that was involved in an accident and things were either not put back properly or damaged parts not replaced by the body shop that was fixing my rover "as good as new, man! nobody will know the difference!"
Good luck. And yes, start with the hood latch sensor. That's the easiest.