Isaiah 38:9, 39:1
Hezekiah must have been sick for some time if it was made such a mention of, and other nations heard of his condition.
The king didn't go to the temple because he was ritually unclean. He also may have been to sick to go, maybe?
Hezekiah's prayer shows his confidence in the Lord.
In Isaiah 37:36, the Lord said He will preserve the city for David's sake – the purpose being that Christ would be born through the lineage of David, of which Hezekiah was. When he was appointed to death, he didn't have any sons. Since he was granted life, he had a son, Manasseh, a few years later (2 Kings 21:1).