I'm facing the exact same problem on my 2005 X5. My car has only 47k. When driving on the highway, the temperature gauge would suddenly kick to red for 5 seconds and then go back to normal. This would happen several times on long highway trips, i.e. >20 miles. When I took the car to the stealer, they changed the temperature sensor (last month). But the problem was not resolved. So, I took it to a different stealer at another state where I recently moved, and they recommended I replace the thermostat. I then replaced the thermostat but did it at a bmw repair shop becasue the stealer wanted to charge me hundreds of dollars for it. Anyway, again the problem was not resolved. I took the car back to the same bmw repair shop and they said that there is nothing wrong with your coolant system but the problem still exists.
I'm getting really frustrated. It only happens when I drive on the highway (60 mph or more) and would only last for 5 seconds. However, when I drive in the city, the temp gauge stays in the normal position.
Your recommendatios will be highly appreciated. I'm not really a car expert, so I might just take your recommendation and get it applied by a nearby technician.