I cannot answer the physiological aspect in any detail, however my understanding is that, given a recovery day with little activity, your muscles will begin the first phase of healing [inflamation etc], this is also coupled with your legs being heavy with toxins from the previous days racing.
To avoid this, the healing part can be improved via active recovery - riding the bike. Everyone is different as to how much riding and how intense it has to be. I have heard Lemond, Fignon & Kelly et al state that experienced riders know what effort they have to do.
Regards intensity: Lemond talks of doing anaerobic efforts on recovery days to trigger testosterone production, the increased testosterone levels aid recovery. Of course some riders have been known to just use illegal testosterone patches. Getting the amount of intense effort on recovery days is critical, do too much effort on your recovery day and you don't recover, you do more damage.
Regarding recovery ride time: this is about flushing out those toxins by getting more blood flow to damaged muscles, oxygen and nutrients in the blood help the muscle to recover more quickly. This is the easy very low effort part of the recovery ride.
The body becomes used to the effort and if you stop, it can seize up - become stiff; the above factors, intensity and ride time impact that.
With regards to the Mountains vs non Mountains stages, the type of effort is considerable different to flatter or rolling stages; you will use more watts on a long climb, there is less opportunity to coast or get dragged along in the slipstream, and, you use more fluids due to the higher effort and there being less of a cooling effect from the wind as you are going slower.
In the mountains, it can feel like doing weights as the cadence is lower and the effort higher - so the build up of toxins in the muscles is higher; the flatter stages involve more opportunity to spin-out for periods whereby its like a mini recovery ride within the stage.