In those days [when Sennacherib first invaded Judah] Hezekiah became deathly ill. The prophet Isaiah the son of Amoz came and said to him, “Thus says the Lord, ‘Set your house in order, for you shall die and not recover.’” Then Hezekiah turned his face to the wall and prayed to the Lord, saying, “Please, O Lord, remember now [with compassion] how I have walked before You in faithfulness and truth and with a whole heart [entirely devoted to You], and have done what is good in Your sight.” And Hezekiah wept bitterly. Before Isaiah had gone out of the middle courtyard, the word of the Lord came to him, saying, “Go back and tell Hezekiah the leader of My people, ‘Thus says the Lord, the God of David your father (ancestor): “I have heard your prayer, I have seen your tears. Behold, I am healing you; on the third day you shall go up to the house of the Lord. I will add fifteen years to your life and save you and this city [Jerusalem] from the hand of the king of Assyria; and I will protect this city for My own sake and for My servant David’s sake.”’” Then Isaiah said, “Bring a cake of figs. And they brought it and placed it on the [painful] inflammation, and he recovered.” – 2 Kings 20:1-7
These verses show that when Isaiah first went to Hezekiah to tell him he would die he was not aware that God would by a miracle extend his life. Though God today may not send to us such an answer as He sent to Hezekiah when we pray in our sickness, yet, if by His Spirit He grants to us contentment and assures us that our sins are forgiven and that, whether we live or die, we shall be His, we do not pray in vain.