The Question and Answer section for The Odyssey is a great resource to ask questions, find answers, and discuss the novel.
Odysseus tells Polephemus his name for no other reason than to boast..... his pridefulness will result in danger for he and his men, as the cyclops father rules the sea upon which they are about to set sail. Polephemus' father is Poseidon.
I believe this is called an invocation.
Odysseus reveals his true identity in Book XXI.