After driving Mercedes-Benz wagons for almost 20 years I have found that both, on S123s and S124s, when you open the sunroof completely or just open ONE of the rear windows without opening the roof or any other window, you get a terrible "thump" noise which worsens as speed increases.
As commented before, is because the car becomes a tunned chamber as air resonates. Funny the M. B. wagons (all of them) respond in the same way. I do not have this problem with my V140.
If you closely inspect the chromed bar that runs under the sunroof on both sides, you will see at the end two drilled marks. If you fully open the sunroof, the front edge of the roof will pass over this marks.
Slide the roof back a little so the front edge of the roof aligns with the first mark (for slow or town speed driving) or with the second mark (for fast / highway speed driving). You just sacrife maybe 1/2 an inch to an inch, but it really works.
CL 500, 1998
S 500 L, 1998
E 320 T, 1995