esp8266 doesn't work when connected to same supply as relays
I definitely recommend adding the flyback diodes across the relays
The bigger the difference between the Vin and Vout, higher will be the power dissipation internal to the regulator. This regulator has an internal power dissipation protection circuit, which may be triggering and resting the board. you can monitor the 3.3 V output for that
It will be helpful to add a series resistor for the switches and also a capacitor for the two input pins. 
Also a 100k pull down to all the transistor base pins if you have space. This will help not to trigger relays accidentally when MCU is reset due to either an ESD event or a spike on it's one of the pins.
i assume 12 V supply is same as the one used for Arduino nano setup, so not doubting on it's current capability.
Try adding only one relay and monitor the 3.3 V supply pin on an Oscilloscope if possible. If it works, go on adding the load. 
Consider adding a few caps at the voltage input pin. It will also help to absorb higher energy coming from make break of relay contacts.




Here is the datasheet of Node MCU ESP 12 Module. 
 http://bienonline.magix.net/public/esp8266-faq/NODEMCU_ESP12.PDF

As per the schematics, a 5 V is expected. the input range is upto 16 V is mentioned in the datasheet. The datasheet of the regulator can be found here.