The question has already been asked in Physics.
According to the information there and here the sprinkling must continue throughout the period when temperatures are below freezing, and is only effective for temperatures down to around -5 °C.
Explanations invoke three interrelated effects: when water freezes heat is released so there is a warming effect; the temperature of an ice-water mixture is 0 °C; and an ice layer will insulate the leaf. As long as the temperature of the leaf stays above freezing there will be no frost damage.