I was getting this pain recently also. I've noticed that it seems to occur mostly when my foot is in the "up" position for an extended length of time. Even if I'm not depressing the pedal, my foot is often still resting on the pedal. I now make sure to stretch my foot every 15-20 minutes or so. Very easy - I simply take my foot off the pedal and tuck it under my chair so the tops of my toes are on the floor. Hold it there for a short time. This gives a nice stretch to the top of the foot and has helped SO much.
To keep my pedal from moving around on the carpet, I put a silicone hotpad under it. It does a great job.
Good luck and I hope your pain is resolved soon!