Your little metal box sounds like it's the valve that diverts the hot water to either CH or HW. Simple replacement I guess.
The ballvalve in the roof tank may simply have got out of adjustment. Pressure rises overnight, and the float level may well have got too high. There shouldn't be any connection between that and the loos flushing.............. unless it's an older system where the loos used to be fed from the roof tank. In which case, drawing from the tank will have lowered the level.