In ancient Greek medicine, phlegm was considered one of the four humors, along with blood, yellow bile, and black bile. Each humor was associated with a particular temperament. Phlegm was associated with a calm, sluggish, and unemotional temperament.
This association of phlegm with a specific personality type led to the development of the word "phlegmatic" in English.
Therefore, the word phlegmatic traces its roots back to the ancient Greek understanding of humoral medicine and the role of phlegm in shaping personality.