Qi Stagnation can cause Phlegm, and Phlegm can block the flow of Qi. This is a snowballing relationship. There are several things which can trigger the formation of Phlegm. If the Spleen is weak, Dampness can accumulate. Cold can turn Dampness into Phlegm - just as cold can freeze water.
Wind can trigger the formation of Phlegm.
For this reason, herbs that strengthen the Spleen are included in almost all of these formulas. Accordingly, herbs that regulate the qi are also included in these formulas. This includes fluids as well as food. The Dampness congeals into Phlegm when it sticks around too long. Spleen Deficiency is the number one Root of Phlegm.