Douglas Harper's Etymology Dictionary
nicky-tam
also nicky tam, "garter worn over trousers," 1911, from Scottish, from shortened form of knickers + Scottish & northern English dialect taum, from Old Norse taumr "cord, rein, line," cognate with Old English team (see team). Originally a string tied by Scottish farmers around rolled-up trousers to keep the legs of them out of the dirt.
Wiktionary
nicky-tam
n. 1 A pair of straps or pieces of string tied around the leg below the knee to raise trousers above the level of farmyard dirt. 2 The same to prevent the ingress of dust and vermin up the trouser leg. 3 (context by extension English) A simpleton or country yokel.