Check first weather it is actually overheating. Use a separate water temp gauge plumbed in somewhere to confirm temperature. Check the wiring loom from the sensor plug backwards as far as you can for damage and chafing.
I remember a long topic on here about this a little while ago about exactly the same issues, could be worth a search.