you mentioned it only happens every now and then maybe your gauge is faulty or loose connection?
was your driving style the same, distance of travelling, too much traffic?
have you checked your thermostat?
any hoses that are kinked?
running lean?
hard to tell
take your car to a radiator shop and they can tell you whats wrong with your cooling system
normally its free to get it checked.
then from there you can change the part/s that needs replacing.
goodluck