Relays turning on randomly when 24VAC sprinkler solenoid valve is shut off
Do your sprinkler solenoid valve have a freewheel diode attached?
like here:
https://en.wikipedia.org/wiki/Flyback_diode

In case of AC supply of the solenoid, use a varistor (an Element which has high resistance below a certain voltage and a low resistance above)
[![solenoid protection by varistor][1]][1]
public domain from https://de.wikipedia.org/wiki/Schutzbeschaltung

If your circuit lacks a protection which consumes the solenoids stored energy when turned off, please attach one appropriate solution and report if the problem still persists.

In case you do not provide a controlled path to annihilate the stored energy it will certainly damage your circuits over the time.
[1]: https://i.stack.imgur.com/HKyCY.png
[2]: https://de.wikipedia.org/wiki/Schutzbeschaltung