The thing to keep in mind about the length of pit stops is that prior to TAR 18, when the just keep racing, no rest pit stops were first introduced, the show had dropped any mention of a minimum pit stop length of 12 hours.
I think we can deduce that the show is using the actual length of rest periods to better control the timing of legs and the overall time needed for filming, so the no rest period between legs 3 and 4 were not truly improvised, but rather a use of their flexible scheduling.