Why did he say "Shachavti va'Ashinah"?
Rashi: My heart is closed with worry and fear.
Radak: I slept confidently and peacefully, like one who has no fear.
What is the connection between waking and Hashem supporting him?
Rashi: He ceased worrying, for he trusted that Hashem will support him.
Radak: Normally, one who sleeps amidst affliction is confounded when he wakens, for he has bad dreams like he thinks in his heart due to his fear. I was not confounded, for I trust in Hashem, for I see in my dreams that He supports me.
Radak citing Shocher Tov: I lied down (ceased) from Nevu'ah, and slept (ceased) from Ru'ach ha'Kodesh. Chushai ha'Archi woke me, for Hashem supports me via Nasan ha'Navi. I.e. David lost Ru'ach ha'Kodesh due to his sadness and fear; it dwells only amidst Simchah. When he saw Chushai he was happy, for he knew that he will annul Achitofel's counsel. He woke, and Ru'ach ha'Kodesh rested on him. Hashem supported him via Nasan - he told him, "Hashem He'evir Chatascha Lo Samus" (Shmuel II, 12:13).
Malbim: Achitofel counseled to take 12,000 men and chase after David at night, when he is sleeping, tired and weak. He will make his men zealous and strike only David. Chushai ha'Archi annulled his counsel, and said that David will not sleep and leave the nation overnight. Rather, they should gather all of Yisrael and fight against David. The verse says that Achitofel's counsel was good. Had he done so, he would have found David sleeping and tired, and he would have killed him. Hashem caused to annul his counsel, to save David. Achitofel saw that his counsel was not done, so he commanded about his house and choked himself. Chushai told all this to David. This is why David said "Shachavti va'Ashinah" - it was unlike Chushai said. Had Achitofel's counsel been done, I would have died, and not woken! I woke - because Hashem annulled Achitofel's counsel.