The standard operating voltage for that microphone is 2.2 volts with a 2k2 resistor in series to a higher supply. Using 5V and a 10k might be a problem though. My advise is to lower the 10k to 2k2 - it is very doubtful if the microphone will be damaged by this because the current into the microphone will still be only a couple of mA. Make sure your battery polarity is correct of course.
If this does not work then it is highly likely that your electret microphone is dead.
I redrew your circuit as an LTspice schematic., below, and I think I got it right.
I'm assuming that you're turning on the relay with current into the base of Q1 from your MCU, represented here by S1 and R4, R4 being the MCU load on the 5 volt supply, and S1 an I/O.
I also assumed that the relay is one of those garden variety 400 milliwatt coil jobs with a closed inductance of 10 henrys and a series resistance (not shown on this schematic) of 330 ohms.
![enter image description here](https://i.stack.imgur.com/6yD4O.png)
If you want to run the simulation, the file is here
If you run it you'll see that the 5 volt supply is nice and clean, that the relay switches properly and doesn't load the 12 volt rail to the point where it affects the 5 volt rail, and that the relay coil's turnoff spike is nicely shunted to the 12 volt rail with no voltage overshoot, and that it doesn't even faze the 5 volt supply.
With that in mind, I'd be suspicious of layout causing your MCU to reset, particularly the RF burst @Spehro mentioned.
As an aside, R1 dissipates about a watt, so if I were building this I'd go for one of those nice little Panasonic 2 watt metal-film power resistors you can find here
Best Answer
If you have a schematic of the circuit and identify where you are measuring, it might be easier to say, but I speculate since you mentioned relays, that this is flyback caused when an inductive load is disconnected. If you don't already have flyback diodes anti-parallel to the relay coils, try adding that.
If it is from the relay, you could be seeing the extended and repeated pulses as the contacts separate, essentially bounce.