This phrase is an expression of endearment, fondness, or appreciation for another person.
It’s listed in the Dictionary of Catch Phrases: American and British, from the Sixteenth Century to the Present Day, by Eric Partridge, which says, “A middle-class catch phrase dating from c. 1905. . . a jocular benediction/thanks, as in ‘Oh, bless their little cotton socks—they’ve left everything ready for us’; or simply in admiration of a baby, child, even a pet animal.”
Another source suggests that the phrase “bless their cotton socks” is quite common, often said as a “thank you” and often ironically or patronizingly, but also offers a possible and interesting historical origin.
George Edward Lynch Cotton (1813-1866) was a clergyman and educator. He spent a number of years at Rugby School and Marlborough College before becoming Bishop of Calcutta in 1858, performing missionary work and founding the famous “Cotton’s Schools.”
Cotton, as a religious man, was known to bless all the equipment used in his schools.
Aware of the abject poverty in Calcutta, he regularly requested Britons for donations of warm socks for the children of the slums; and socks by the thousand were dutifully knitted and sent to Calcutta labelled “Cotton’s socks for blessing.”
This soon became abbreviated to “cotton socks” and the phrase “bless their little cotton socks” entered into the language.
Apparently, Cotton’s schools, which he founded in Bangalore, Bombay, Calcutta and Shimla continue to this day.
Whether or not the story is true, I do not know, but the fact that socks are usually knitted from wool, not cotton, is a point in its favor.