While the fuel pumps on the 5 series are rather robust, it might be worth replacing your fuel filter first before you plop down a couple hundred for a new pump. You would have to change the filter anyway after a pump replacement. The idea here is that maybe your filter is starting to get dirty and is placing the pump under load causing the noise. There are pumps that constantly make noise (steady whine) and are perfectly fine, just the nature of them. But if you notice it getting louder and the steady noise changing, the fuel pump relay could be causing some problems also.
In short, start with replacing the fuel pump relay and the fuel filter before condeming the pump. You can verify that the pump is producing adequate pressure by doing a pressure test after the filter is replaced. Fuel pumps are cooled by the fuel in the tank, so if your tank was near empty, it would explain a pump making more noise. Try not to let the tank get below 1/4, especially on aging pumps.