With the lack of other symptoms, the miles and year of your car I would investigate the wiring harness first. Many, many go bad (mine did) in the M104 engines. Search 'wiring harness' and put aside a few hours to read all the posts.
1994 E320 Wagon (Died @ 308,669 miles)
1995 E300 Diesel (194,000)
1999 E300 Turbodiesel (244,000 miles, dies at 255,000)
2006 Toyota Tundra SR5 AC 4X4 (115,000 miles)
2011 Audi A4 Avant (129,000 miles) hate this car!
BMW 330 xi 6 speed manual (100,034 miles)