Webb suggests that chapters 38-39 occurred chronologically before chapters 36-37 (Webb, The Message of Isaiah, p35).
If he is right, then the order has more to do with the shape of the book than simply giving us the facts of the stories. The story of Sennacherib is the story of Assyria's attempted invasion of Jerusalem, which failed. The story of Hezekiah's illness and the Babylonian envoys is the story pointing to the future exile and captivity of Judah by Babylon.
In those years of exile, it is the words of comfort (chapters 40ff) that will be the most important chapters of hope.
1-35 - Judgment and Yahweh's Kindness
36-37 - Sennacherib/Assyria
38-39 - Babylon
40-66 - Hope in the Midst of Yahweh's Coming Exile