Mine do this from time to time. Sometimes the rear one opens when I start the engine, sometimes it just tilts, sometimes the front, sometimes the rear closes in stages and sometimes the switch reverses - open=close, close=open! There seems to be no logic to it, hot cold wet or dry, it's random. I'm sure there is a poltergeist in there!
Leave the engine off for a few minutes and it's all back to normal again, whatever is normal for a Land Rover.
Just one more thing to sort when I have the roof lining out to sort the sunroof leaks.