The motors that adjust the beam height often buzz when they fail. The adjusters have a plastic rod with a ball on the end, that is wound in and out by the motor turning a small nylon gear wheel . The ball fits into a socket on the back of the reflector, so as the rod moves in and out, it pushes or pulls the reflector, and that changes the beam height.
If the rod jams, or the pin on the nylon gear wheel gets stiff etc. the motor strips the teeth on the wheel, so the wheel can no longer turn, so the rod no longer moves and the beam no longer adjusts. The motor keeps turning (buzzing) because the rod is in the "wrong" place and not moving.. so it keeps trying to wind it in/out. Eventually the motor burns out and the noise stops.
On the other hand.. to have this scenario, the beam adjusters must be not working.. since if they're working they will arrive at the selected position and then the motors would stop winding. It's also peculiar to have two motors go wrong at precisely the same time, so my guess is that your beam adjusters are fine.
Does the car have LED or HID headlamps, or regular halogen bulbs? If it's the former then those have a transformer or inverter which could be making the noise. If you disconnect the big plug on the back of the headlamps, does the noise stop or continue? Is the noise coming from the headlamp itself, or from the vicinity (something mounted next to it)?
Ralf S.