As per Devibhagavata Prathamaskanda, once Vishnu looked at Lakshmi and laughed without any reason. Lakshmi thought he was making fun of her because he had found someone more beautiful. She cursed that he would be beheaded. Immediately, a few asuras challenged Vishnu for a duel. He took them on single-handed with his bow. The fight went on for a long time, and finally Vishnu decided he needed some rest. He fixed one end of the bow on the ground and rested his head at the end, and soon fell asleep. Meanwhile, the devas were conducting a yajna, and everyone save Vishnu reached there. Since it was necessary for him to present, the devas came searching for him to Vaikuntha. They didn’t find him there, but Brahma’s divine sight enabled them to find him finally. They didn’t want to wake him but soon became impatient. Then Brahma found a way. He created termites who were asked to break the bowstring and wake Vishnu up. But they argued that the sin would fall on them. Brahma was convinced by that and agreed to give part of the yajna’s benefits to the termites. They broke the bowstring and the bow became straight with a huge noise. The devas panicked as the earth trembled and Vishnu’s head flew up into the sky and then fell into the ocean. When Brahma and the other devas opened their eyes, they saw a headless Vishnu. It turned out to be a blessing, since the asura Hayagriva had received a boon that only a being with a horse’ head would be able to kill him. The devas kept a horse head on Vishnu and he asked the termites to break Hayagriva’s bowstring as well. Soon Vishnu was able to kill the asura as per Devibhagavata Prathamaskanda.