The earliest recorded use of the phrase is in a book by C Mackenzie called 'Carnival' published in 1912. It contains the words: "I wish you'd listen. Have you got cloth ears?" In one of P G Wodehouse's books, published in the 1920s, he refers to someone as a 'cloth-head' on the same sort of basis. Presumably, the idea was created on the basis that cloth is a deadening agent difficult to ;get through'.