That you save energy by switching the heating off overnight is obvious, the altogether more interesting question is whether the energy saved is in proportion to the time switched off, and the answer is that it's not.
I measured my house over the winter 2017/18, and a 29% reduction in heating hours gives an 8% reduction in gas consumption. If there were no thermal inertia in the fabric of the building, and the rise time when the heating comes on were the same as the fall time when it switches off, then the mean consumption vary in proportion to the duty cycle of the timer, but that's not the case. The system's controlled by a thermostat, so when it comes on from cold the boiler works hard to satisfy the thermostat asap, and the room temperature that's driving the heat loss rises quickly, but falls slowly.
I also have thermal model of the house and heating system on the computer, and got a better result of 11% for 29% off, but that doesn't take account of the occupants' tendency to turn up the heating to maintain the same subjective warmth. The mean temperature of the walls drops, and their inertia smooths out the daily cycle, so this induces a counterproductive urge to turn the heating up in order to compensate for the walls which are slower reheat, because your comfort depends on mean radiant temperature as well as air temperature.