I had a cat attack me once. She heard one of the kids scream when they fell and she thought I was hurting them so she attacked me. She thought she was their momma. So your cat might just be reacting to the sound you made when you stubbed your toe. In the excitement he probably wasnt sure how to react and then followed you around to make sure you were ok.