If you have not checked your coolant level, make sure it is full.
If you have a scanner with live data, it could be useful to see what the ECT is when the temp gauge is misbehaving. Also, the code for this problem may be a 2 trip code so that may be why it does not register immediately. It could also be an intermittent issue somewhere, those can be a bear to track down.
You can test an ECT sensor with water, a thermometer and an ohm meter. There are tables available that give the temperature/resistance relationship.
Good luck, let us know how it goes…