You might be right about the sensor, considering that it happens at random intervals...maybe it's just going bad. But the second thing...I never hear the sound when I'm braking.
I've actually ruled out any problems with the engine itself, because I only hear it when the car is actually moving. I've tried revving in park and neutral, but I don't hear anything unusual. Therefore I'm assuming it's either a problem with the axles or something else moving under the car. And I still can't make sense of why the problem seems to stop after driving a few miles. I might end up taking it to a stealership soon.