As per Devibhagavata Shashtaskanda, Vritra swallowed Indra after getting a boon from Brahma. The devas approached Brihaspati for help, and as per his advice, they made Vritra yawn. But he then couldn’t close his mouth. Indra used this opportunity to escape. See Vritra for details.