LCD 20x4 - Comunication via Bus I2C problems

Just a guess, because we don't know anything about the rest of your circuit, but it could be that you are you using relays and the relays are creating electrical power issues for the LCD device.
It could be power glitches or noise spikes.

We need to know more about your overall circuit.

--- bill