"ill-humor," 1727, in humps and grumps "surly remarks," later the grumps "a fit of ill-humor" (1844), then "a person in ill humor" (1900); perhaps an extended sense of grum "morose, surly," which probably is related to Danish grum "cruel;" or perhaps suggested by grumble, grunt, etc.
adjective suffix, "full of or characterized by," from Old English -ig, from Proto-Germanic *-iga- (source also of Dutch, Danish, German -ig, Gothic -egs), from PIE -(i)ko-, adjectival suffix, cognate with elements in Greek -ikos, Latin -icus (see -ic). Originally added to nouns in Old English; used from 13c. with verbs, and by 15c. even with other adjectives (for example crispy).
<a href="https://www.etymonline.com/word/grumpy">Etymology of grumpy by etymonline</a>
Harper, D. (n.d.). Etymology of grumpy. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/grumpy