Ibn As-Sinni reported that when the Prophet, peace be upon him, put on his clothes, whether a shirt, a cloak, or a turban, he would say, “O Allah, I seek from You its goodness and the goodness for which it is made, and I seek Your refuge against its evil and the evil that is apportioned for it.”
Mu’azh b. Anas reported that the Prophet, peace be upon him, said, “If anyone wears a new garment and says, ‘All thanks and praise be to Allah, Who clothed me and gave me sustenance, whereas I have no power or strength,’ Allah will forgive all his previous sins.” To pronounce the name of Allah is also recommended, because anything done without invoking Allah’s name is flawed.
Abu Sa’id Al-Khudri reported that when the Prophet, peace be him, got a new piece of garment, he would mention it, whether a turban or a shirt or a cloak, and then would say, “O Allah all praise and thanks be to You. You have given me this garment. I seek from You its good and the good that is made of it and I seek Your refuge against its evil and the evil that it is made of.” (Reported by Abu Daw’ud and Tirmizhi, who considers it a sound hadith)
‘Umar reported that he heard the Prophet, peace be upon him, say “If anyone wears some new clothing and says, ‘all praise and thanks be to Allah Who clothed me to cover my nakedness, and made it a means of adornment for me,’ and then takes his old garment and gives it in charity, will be under the protection of Allah and will be treated as if struggling in the cause of Allah, in life and after his death.”