In the Devi Mahatmya Vishnu lies in yogic sleep on the waters while Madhu and Kaitabha threaten Brahma; only when Brahma praises Mahamaya and she leaves Vishnu's body can he rise and fight.
The first episode of the Devi Mahatmya makes the point that even Vishnu's action depends on the Goddess. While he sleeps on the waters at the end of an age, two demons born from the wax of his ears rush at Brahma on the navel lotus. Brahma does not wake Vishnu; he addresses the sleep itself, Mahamaya, as the power who both disturbs and restores the world, and asks her to leave. Only when she withdraws from Vishnu's body does he rise, and the fight that follows lasts five thousand years. The Shakta frame is that the Goddess permits both the danger and its cure.