The cavity varnish applied reduces post operative sensitivity in amalgam restoration by:
Varnish reduces the infiltration of irritating fluids through marginal crevices and lessens pulpal irritation. Varnish is also claimed to prevent the penetration of corrosion products of amalgams into the dentinal tubules, thereby reducing the unsightly tooth discoloration often associated with amalgam restorations.
Phillips 12 ed page 314
Decreasing conduction of heat to pulp
Minimize marginal leakage around restoration
By altering the chemical composition of restoration materials
By preventing penetration of corrosion products into the dentinal tubules