This is a good question. The key moments for this change, I would say, appear in Book 9, Books 5 and 6, and Book 13.
In Book 9, Odysseus makes a crucial mistake that causes him to incur the wrath of the god Poseidon. That mistake is revealing his real identity to the Cyclops Polyphemus, who is the son of Poseidon. The key quotation appears near the end of Book 9:
So they argued, but could not daunt my ardent spirit, and I shouted to him again in anger: “Cyclops, if any man asks how you came by your blindness, say that Odysseus, sacker of cities, Laertes' son, a native of Ithaca, maimed you.” (A.S. Kline translation)
Odysseus' angry boast here leads to Polyphemus' curse against him, which eventually leads to Poseidon's stormy attack on him when he sails away from Calypso's island (see Book 5).
By the time Poseidon is done with Odysseus in Book 5, Odysseus is naked and sleeping in a bed of leaves. This is literal humility as Odysseus is sleeping on the ground in the dirt (our word 'humility' comes from the Latin word for dirt, humus).
When Odysseus awakens in the land of the Phaecians, he is naked. The hospitable Phaeacians clothe him and return him to his native land, but upon arriving in Ithaca goddess Athena disguises him as a beggar:
She wrinkled the smooth skin on his supple limbs, and thinned the fine hair on his scalp, and gave him the body of an old man. She dimmed the beauty of his eyes, and dressed him differently, in a wretched cloak and ragged tunic, of tattered filthy smoke-grimed cloth. Then she flung a large deerskin, devoid of hair, over his shoulders, and handed him a staff, and a sorry-looking leather pouch, punctured here and there, hanging from a piece of braided cord.
Thus, by the end of Odyssey 13, Odysseus has become further humbled, dressed as a beggar, and this is the clothing he will wear until he strings his bow at the end of Odyssey 21. Accomplishing this feat, results in his transformation back into his true hero self.
We might also add that between Books 13 and 21, Odysseus experiences further humiliation as he begs for food in his own house and is even abused by another beggar, Irus, in Odyssey 18.