The fuel gauge sending unit is a variable resistor.
Pull the sending unit, and remove the outer tube.
Inside are two parallel wires with a wiper on a float that connects the two wire. These wires oxidize and will create an intermittent connection.
Use some very fine sandpaper and gently wipe down each wire where the wiper makes contact with the wires.
I had the same problem and the fix was as describe above. The displayed level no longer jumps around... but I use the fuel gauge as a low I.Q. suggestion. When I get to 200 miles on the odometer, I fill up.
I think this bit of advice is worth repeating, particularly after a winter of inactivity with your M3W. My fuel gauge was all over the place when I put the car back on the road back in the spring. I gave the wires a quick rub down with some fine abrasive and the indications stabilised. I wouldn't go as far as to say they were accurate but they were much better. The 280 mm sender will give more reasonable indications than the standard 240mm one but is still not to be relied on.