It's called heat soak. The coolant needs to be circulating to shed its heat. When you shut the engine off, the coolant in the block just sits there, absorbing heat. I assume that when you restart the motor, the temperature comes down to normal range. If so, everything is working perfectly normally and there is no need for concern.