late 14c., "to quickly bow the head; to assent, beckon, or salute quickly by an inclination of the head," late 14c., nodden, a word of unknown origin, probably an Old English word, but not recorded, or perhaps from a Low German word related to Old High German hnoton "to shake," from Proto-Germanic *hnudan (OED considers this "doubtful"). Apparently unrelated to Latin nuere "to nod." Related: Nodded; nodding.
Meaning "droop the head forward with a short, involuntary motion," as when drowsy, is by 1560s. Figurative sense of "be guilty of a lapse, be momentarily inattentive" is by 1670s, echoing Horace's dormitat Homerus. Of flowers, etc., "to droop or bend downward," c. 1600. Meaning "to drift in and out of consciousness while on drugs" is attested by 1968 (as a noun in this sense by 1942).
A nodding acquaintance (by 1821) is one you know just well enough to recognize with a nod. Land of Nod "state of sleep" (1731) is a pun on the biblical place name east of Eden (Genesis iv.16).