First of all, you have to remember that Polyphemus the cyclops is the son of Poseidon the sea god. After Odysseus and his men blind the cyclops and sail away, Polyphemus prays to his father. He asks his father to take revenge on Odysseus. He gives Poseidon a choice. He asks that Poseidon either never let Odysseus reach his home or that he should only let Odysseus reach his home after a huge amount of trouble. In this second option, he also hopes that Odysseus will find trouble waiting for him at his home.
The book says the Poseidon heard his prayer. You find out in the rest of the book what happened because of that.