ESP should have a stable power supply. If your relay is also powered by the same source then very likely the spike is causing a brown out for ESP. Tie a 470uF 10V cap and 100nF ceramic at Vcc of ESP.
Relay contacts create arcs that have high spikes. Try NC pins of the relay and try to switch the load off and see (instead of switching on). If the board resets then you have EMI as the major suspect. EMI is a tougher problem to solve and the solution for your problem is little complex (more on that later)
Spurious signals at RST will cause this. Tie this pin up with a 4k7 resistor to Vcc. I'm sure you will find the solution if you can do some signal analysis.
You can do signal analysis for cheap on your laptop by using the sound card as oscilloscope. Use an external USB sound card and not the internal one to prevent damage. This site shows how to build one. DO NOT USE IT FOR LINE VOLTAGE analysis
http://www.instructables.com/id/Use-You ... illoscope/
Let us know if it works out.