Vritrasura was the demon of drought and was killed by Indra after a fierce battle. But during the battle, when all the demons were fleeing from the onslaught of the devas, Vritrasura was enraged. He stopped the devas frm attacking them, saying that they were unfit to be attacked. He went on to speak spiritual truths. Indra praised him and they had a great discourse in the middle of the battlefield. Then they picked up their weapons and fought with a sense of duty.
(This is not what happened in the show, though.)
So Indra was swallowed by Vritra and he emerged by severing his head from inside.
So in Srimad Bhagavatam, Parikshit asks Sri Shukabrahmam how is it that an asura was able to talk about spiritual truths.
Shuka said that Vritrasura was in his previous birth a Vishnubhakta King called Chitraketu. HE was childless, so with the help of Rishi Angira, his wife gave birth to the child. But the king's other wives were jealous, so they poisoned the child and killed him. Saddened by this, King Chitraketu gave up all work and lamented in his palace. So sage Narada and others came and relieved him of his grief. The other wives of the king too washed away their sins by confessing and observing many poojas.
When Chitraketu was like this, Adi Sesha, the Serpent of Vishnu, came and instructed him on spiritual truths. After blessing him, Adi Sesha gifted him an aircraft (personal helicopter) and left. Being taught by Adi Sesha himself, Chitraketu became very arrogant.
Once he was going by Kailasa, where Mahadev was sitting with his arm around Parvati, in front of many sages. He immediately landed their and said, "Oh Mahadev! You are supposed to be the Supreme Lord of this Universe. And you are shamelessly embracing mOther Parvati in public!"
He went on to critisise a lot about Mahadev. Parvati couldn't bear this.
She said, "Oh Chitraketu-ji, so many rishis, who are here, they don't know any spiritual truths, isn't it? Lord bRahma, Lord Vishnu, Goddess Lakshmi, Goddess Saraswati, no one knows any moral instruction no?"
Turning to Mahadev, she said, "O Mahadev, from now on, I think this Chitraketu is the moral instructor of the Universe. Look how easily he is critisizing you! Does this behaviour suit a Vaishnava? Just because he has been blessed by Adi Sesha, he thinks he is So great!
I curse you, O King! Becuase of your unworthy behaviour, dear son, you shall be born as an asura! Then only you will learn your lesson!"
Here Parvati addressed him as son, because, like a mother punishing her son for a wrong deed, she is punishing him. After all, she is Jaganmata.
King CHitraketu happily accepted the curse and apologised for his mistakes. HE then went to take birth as an asura. Lord SHiva praised his attitude of receiving her curse without any sorrow or anger.
Thus Vritrasura was a great gyani, and so it took a whole year for INdra to sever his head from his body. Not backstabbing as they showed in the show.