There are some parallels with the first book. Poseidon hasn't really been wronged. His son has been disfigured, but his son wasn't blameless. The gods don't help him and hope he will calm down. In Book XII, Helios, the sun, is wronged and Zeus says he'll make the mortals pay. Book I contains the story of Agamemnon's homecoming and Agamemnon's foolishness as opposed to the actions of Aegisthus and Clytemnestra which was more than foolishness since they had been divinely advised against it: "for I sent Mercury to warn him not to do either of these things...." The story of the men on the island of Helios has similar examples of human folly.
Odysseus fell asleep once before with disastrous consequences (Book X). Odysseus and his companions were in sight of Ithaca when Odysseus decided to take a nap. His companions took the opportunity to open the bag of Aeolus had given him. The bag contained winds, but the men were convinced it contained wealth. This time (Book XII), when Odysseus falls asleep the men listen to the advice of the trouble-making Eurylochus. Eurylochus tells them that starving is an awful way to die. The trouble is, they're not starving. They are eating fish and fowl. They have no physical need of the cattle, but they slaughter and eat them, anyway. Helios is mad and like Demeter, when she refused to feed the world when her daughter was abducted by Hades, Helios threatens not to shine. He says he'll go to Hades to hide his light.
Odysseus makes mistakes and so do his companions. His companions get in trouble for a specific kind of mistake or human weakness of the flesh called atasthalie, which is defined by Finkelberg as an error that originates in the rational, as opposed to ate which is an error originating in the irrational. Odysseus' falling asleep is ate. There was nothing calculated or rational about it. Segal says that the gods don't act malevolently, but take advantage of human atasthalie. Odysseus rails at Zeus, but Zeus is acting with justice when he hurls the thunderbolt. Odysseus even knew he was asking for trouble when he allowed his companions to land at Thrinacia.
"Patterns of Human Error in Homer," by Margalit Finkelberg.
The Journal of Hellenic Studies. 1995
"The Pattern of the Odyssey," by John L. Myres. The Journal of Hellenic Studies. 1952
"Divine Justice in the Odyssey: Poseidon, Cyclops, and Helios," by Charles Segal. The American Journal of Philology. 1992