"In the year that Tartan came to Ashdod, when Sargon the king of Assyria sent him, and he fought against Ashdod and took it, at the same time the LORD spoke by Isaiah the son of Amoz, saying, 'Go, and remove the sackcloth from your body, and take your sandals off your feet.' And he did so, walking NAKED and barefoot.
"Then the LORD said, 'Just as My servant Isaiah has walked NAKED and barefoot three years for a sign and a wonder against Egypt and Ethiopia, so shall the king of Assyria lead away the Egyptians as prisoners and the Ethiopians as captives, young and old, naked and barefoot, with their buttocks uncovered, to the shame of Egypt. Then they shall be afraid and ashamed of Ethiopia their expectation and Egypt their glory.'
"And the inhabitant of this territory will say in that day, 'Surely such is our expectation, wherever we flee for help to be delivered from the king of Assyria; and how shall we escape?' " (Isa. 20:1-6, NKJV, emphasis added)
As you can see, the God of the Universe had a reason for telling him to do this. He was giving a sign and warning to the Egyptians and Ethiopians that would make them afraid to do the things they were doing. He was showing them in this prophetic action that they would become slaves of the Assyrians under Sargon's family.