Sounds like some kind of electrical issue. I would start by having someone examine your headlight switch and related wiring and connectors. There is much power going through the switch and wiring, and sometimes things can get worn out.
RepairPal Certified shops can diagnose and repair your 2008 Mercedes-Benz C350. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.