<p>I recently switched to a RAMPS 1.4 on an Arduino Mega 2560.
Ever since I have extruder temperature swings a couple of minutes into the print, but it looks like a problem reading the temp rather than actual fluctuations in the temperature (as can be seen in the attached pic).
Also, I've noticed that the MOSFET is getting really hot when I heat the heated bed.</p>

<p>What is the problem and how can I fix it?</p>

<p><a href="https://i.stack.imgur.com/QETof.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QETof.png" alt="enter image description here"></a></p>

For the really hot mosfet I would say it might be a good idea to get one of those external mosfet module boards. It just seems like a good idea to me, to not have the huge current of the bed-heater flowing through the ramps board. And for the thermistor wires, do you have them twisted together? If not, try tightly twisting the pair (of + & -) together to ensure there is no interference from other signals. Careful not to put stress on where the wires are attached to the actual thermistor-head. Honestly, all of your wiring should be in twisted-pair configuration.
https://en.m.wikipedia.org/wiki/Twisted_pair