Really weird pedal issue (2001 VW Jetta)

A couple weeks ago I bought a 2001 VW Jetta with 176,000 miles on it. The car runs well, but for the past four days this has been happening:

Every time I start the car, after it’s been off for a couple hours, neither the gas nor the brake pedal work. I can push them down, and I hear the car trying to respond but it doesn’t do anything (well, it does move a little, as though it’s in neutral). Then, when I turn the car off and then turn it immediately back on, both pedals are back to normal and work perfectly fine again.

It’s happened every time I start the car for the past few days.

I’d really appreciate any insight.

If the car doesn’t move, how do you know the brake pedal is not working?
What does “trying to respond” mean? Does the engine rev up but not move? Or do the RPM not increase at all?
Knowing as little as I do, I’ll take a guess anyway. The brake is fine, but the throttle position sensor is functioning intermittently. (there is no cable from the gas pedal; a sensor reads it’s position).