It's really too hard to say what it was. Could have been you bumped a nerve in your foot somehow. I would see a doctor about it if it keeps happening. Just keep some notes on it, when it happens, what you were doing and what you experienced if it keeps happening to help narrow down possible causes. Other than that sometimes the body just does odd things and never does them again. It can be a mystery but just keep an eye on things but try to not worry.