When someone is falling asleep and their head starts bobbing up and down like their a chicken pecking at corn on the ground.
Coach Smith noticed his student falling asleep during class and he threw a tennis ball at him and asked him to stop pecking corn in his class.