Liver congestion happens frequently with immune activity. The immune system produces toxic byproducts that are used to kill infections, these byproducts attack cell membranes and put burdens on the liver to detoxify.
Magnesium plays a key role in many functions of the body including glutathione production which is necessary for liver function.
Magnesium is also wasted during any form of stress with biological stress being one of the most trying. Magnesium also supports adrenal function, cellular function and so on. Other electrolytes are wasted as well.
For myself, I used herbal complexes to support the liver along with acupressure points.