While Odysseus was away praying, Eurylochus was giving evil counsel to the men on their lack of food situation; saying he would rather be punished for eating the cows than die a horrible death starving.
All deaths are bad enough but there is none so bad as famine. Why should not we drive in the best of these cows and offer them in sacrifice to the immortal gods?... I for one would rather drink salt water once for all and have done with it, than be starved to death by inches in such a desert island as this is.
I do indeed agree
After Eurylochus was done convincing the men, they set off to the cows, where they killed them and dressed their carcasses. Odysseus had awoken from his sleep to the smell of roasting beef. He knew what had happened and he cursed out the gods for making him sleep.
Father Jove and all you other gods who live in everlasting bliss, you have done me a cruel mischief by the sleep into which you have sent me; see what fine work these men of mine have been making in my absence
Helios went to Zeus in anger from Odysseus's men eating his cows. He wished for vengeance on them. Zeus had no choice but to punish the men. So when Odysseus and his men set off onto the sea, Zeus struck their ship with a lighntning bolt, killing all the men with the only survivor being Odysseus.