Put on your thinking cap
Take time for consideration of some question.
A 'thinking cap' was previously known by the appealing name a 'considering cap'. That term has gone entirely out of use now but was known since at least the early 17th century, as in this example from Robert Armin in Foole upon foole, 1605:
"The Cobler puts off his considering cap, why sir, sayes he, I sent them home but now."
It seems odd but people did actually use thinking caps when considering difficult problems.
The earliest record I can find for the term 'thinking cap' is from the USA, in the Wisconsin newspaper The Kenosha Times, July 1857:
"This tendency is a very good thing as the safeguard of our independence from the control of foreign power, and it obliges every man to keep his thinking cap on."
That citation uses the term figuratively - there's no suggestion that it refers to a real cap. The figure who comes to mind when wondering who might wear such a cap is Sherlock Holmes. In the stories he was portrayed as settling down in a smoking jacket to consider difficult 'three-pipe' problems. There's no record of his wearing a cap to accompany the jacket though.
Nevertheless, such caps possibly did exist. The 'considering cap' is explained at great length, in fiction at least, in The History of Little Goody Two-Shoes, 1765, which usefully includes an etching:
...a considering Cap, almost as large as a Grenadier's, but of three equal Sides; on the first of which was written, I MAY BE WRONG; on the second, IT IS FIFTY TO ONE BUT YOU ARE; and on the third, I'LL CONSIDER OF IT.
Such a device might be useful to us today, as the text went on:
..."it strictly enjoined the Possessor to put on the Cap, whenever he found his Passions begin to grow turbulent, and not to deliver a Word whilst it was on."
I can't find any record of actual considering or thinking caps. Nevertheless, the metaphor must have arisen for a reason and the use of real thinking caps is as good a reason as any. Citations which include lines like "I must put on my thinking cap" are ambiguous as it is difficult to determine whether they refer to actual headgear. I'll pass this one over to the archaeologists.