Gas light comes on even when I have plenty of gas in it on 2000 Mercedes-Benz E430 4MATIC

Empty light for gas comes on randomly while driving while i still have enough gas. When you shut the car off and turn it back on the lights off but soon again comes back on. Any ideas how to fix it or what it is?