When did he seek Hashem?
Radak: When he was in their hands (of Avimelech and his servants). Malbim - even though he prayed only about this affliction, Hashem saved him from all afflictions 1 , like a total Ba'al Chesed, who does the ultimate Chesed.
Why would David not pray about other afflictions?! Perhaps Malbim discusses afflictions that David did not know about, e.g. that Sha'ul would through a spear at him with intent to kill him. (PF)
What are "Kol Megurosai"?
Rashi: It is an expression of fear, like "va'Yagar Mo'av" (Bamidbar 22:3). Radak - the plural refers to [fear of] Avimelech and Sha'ul, who sent to David's house to kill him, and threw a spear at him to kill him several times.