Contrary to a common belief, oil is compressible and so if a volume of pressurised oil between the cylinder and the load control valve (including the oil in the cylinder) experiences a temperature change then the volume will increase or decrease. If it increases this will mean the pressure will try and increase but if it exceeds the setting of the counterbalance valve, this valve will open and relieve the pressure.
If however the temperature decreases then the volume will reduce trying to cause a reduction in pressure. This cannot normally happen because the valve will be supporting a load so the pressure cannot fall and so the cylinder will extend or retract to maintain the load pressure. This can often be seen when a machine is left overnight. For information the approximate compressibility of a medium grade hydraulic fluid is 0.5% per 70 bar by volume.