Old English feowertig, from feower "four" (see four) + tig "group of ten" (see -ty (1)). Cf. Old Saxon fiwartig, Old Frisian fiuwertich, Dutch veertig, Old High German fiorzug, German vierzig, Old Norse fjorir tigir, Gothic fidwor tigjus.
Forty winks "short sleep" is attested from 1821, In early use associated with, and perhaps coined by, eccentric English lifestyle reformer William Kitchiner M.D. (1775-1827).