2008 BMW 535i / 140,000 miles vibrating sound

2003 BMW 530

Our car will sometimes shake/make a grinding or vibrating sound when started (maybe 2 times per week?). We will start the engine in the morning. And while it is still in park, it will slowly begin to make the sound and vibrate the car. Once put in drive, the shaking / sounds stop. It will begin again when stopping at stop signs or idling at red lights, and stop when the car is put into park.
After being driven a few miles (10 or so) the car no longer shakes or makes the noise when stopped or idling. And there are no issues the rest of the day.

Any idea why this issue would happen so sparingly?

The car has received regular oil changes (though there is a small leak that we noticed the other day) and just had the brake fluid flushed.

Thank you to all who know what this issue is / how much it could cost to fix!!

My first thought would be a misfire. This may be caused by a leaking fuel injector on a particular cylinder. In the morning when you first start it up the cylinder is flooded. And once the engine has time to warm up and clear out you no longer experience the issue until it has time to sit. Once sitting for the evening the fuel injector allows the fuel to once again leak in the cylinder. And flooding it causing a fouled plug/misfire issue.

Of course if the check engine light is on have the codes pulled and post them.