It's happened since I was very little.
And when it does, I look into the Psalms for God's promises:
"Blessed are all who take refuge in Him." Psalm 2:12b
"I lie down and sleep; I wake again, because the Lord sustains me. I will not fear the tens of thousands drawn up against me on every side." Psalm 3:6
"I will lie down and sleep in peace, for you alone, O Lord, make me dwell in safety." Psalm 4:8
"But let all who take refuge in you be glad; let them ever sing for joy. Spread your protection over them, that those who love your name may rejoice in you. For surely, O Lord, you bless the righteous; you surround them with your favor as with a shield." Psalm 5:11-12
"My shield is God Most High, who saves the upright in heart." Psalm 7:10
"The Lord is a refuge for the oppressed, a stronghold in times of trouble. Those who know your name will trust in you, for you, Lord, have never forsaken those who seek you." Psalm 9:9-10
Praise Him. :)