Here's how it evolved:
* Crest: In heraldry, a crest is the topmost part of a coat of arms, often depicted as a helmet with a figure or object on top.
* Fallen: This refers to the crest being lowered or drooping, signifying defeat or humiliation.
Therefore, crestfallen literally means "having a fallen crest," which metaphorically describes a person feeling dejected or depressed after a setback or disappointment.
The term first appeared in English around the 16th century and has since become a common idiom.