The iPhone 4S would have a thermistor (a thermal dependant resistor) which is how the iPhone can measure temperature. For most thermistors and most definitely this one the resistance decreases due to the rise in temperature, the micro-controller can measure this resistance and act accordingly. Water obviously conducts electricity to a point, you may have some vapour on this input which is slightly rising the resistance just enough to make the iPhone 'think' it is hotter then it actually is.
You can use one of these 'dry bags' that iFixit owns or, a rather more ingenious way is to put your open iPhone into a bag of dehydrated rice overnight, whilst leaving it in a dry, warm area like the drying room in your house. The rice will absorb the water vapour and should solve the problem. That would be the most logical explanation and the most suitable solution.
Hope this helps!