Residual stress relaxation in sputtered ZnO films has been studied in-situ by synchrotron x-ray diffraction. The films deposited on (001) Si substrates were thermally treated from 25°C to 700°C. X-ray diffraction 2D patterns were captured continuously during the heating, plateau and cooling ramps. The corrections carried out for compensating the furnace drift are discussed. We first observe an increase of the intrinsic compressive stresses before stress relaxation starts to operate around 370°C. Then, thermal contraction upon cooling dominates so that overall, the large initial compressive film stresses turn to tensile after thermal treatment. The overall behaviour is discussed in terms of structural changes induced by the heat treatment.