The pedal body on the pedal spindle could be loose due to wear or other problems such as bad bearings. The pedal spindle itself could be unscrewing itself from the crank arm due to the above or not being threaded properly. Or the crank arm could be loose on the bottom bracket. If it's the bottom bracket itself you would have noticed long ago because it would have been wobbling, creaking, grinding and generally misbehaving.