However without schematic of your circuit that's very difficult to have any assessment but i think this problem don't related to earth.
1)please check circuit supply which it stable when relay be on ,second do you use free willing diode for that.
Though if you think this problem make by earth then you maybe should use transformer (for supply) and make isolation secondary and your circuit to earth (don't plug circuit ground and secondary of transformer to earth.)