I child can not understand sexuality at that age.
Funny story here my daughter used to do the same thing. Her feet stank and she would always do it and I would ask her why and she didn't have a response.
Best thing is to ignore it, its just something he is doing that isn't to worry about. Kids do some weird stuff LOL
A four year old is not going to get sexually aroused by anything. He had a hard on because he probably had to go to the bathroom.
If this bothers you, then don't let him smell your feet. Although, I am curious as to what the attraction is for him. I would think that it must be something that you have used to make them smell nice?