Why relay module occasionally switches by itself ON?
I don't have the values but the module schematic shows transistor base left floating while inactive which makes them sensitive to EM noises. Depending on the values a resistor between base and emitter or from optocoupler emitter to ground can help alot. This is the module schematic I found