Update:
It seems like it's settling down again. I wonder whether the MICU (Multiplex Integrated Control Unit) needs to calibrate the sensor readings, which takes some amount of either time or engine restarts. From what I can tell, the MICU handles stuff like automatic lights, wipers, etc.
It's not outside the realms of possibility to think that disconnecting the battery purges the "daylight" data from the MICU. If I were to make an educated guess, I'd say that the ECU has permanent storage - it has to, for things like the engine timings and odometer - which isn't purged by disconnecting the battery.
I wonder if the MICU's onboard storage is dependent on having power...
In any case, my light sensor seems to get it right more often than not now. It's still a bit too "keen" to turn the headlights on - for example when I drive under a tree for about a second - but it's getting better...