I've had this problem since 2008 at least, and I have no idea what it is. The sides of my feet (about where number 4 is in this image, though not quite so long, only about an inch, maybe more, near the smallest toe https://upload.wikimedia.org/wikipedia/commons/5/5d/Foot.png) cramp up real bad. The cause of the cramps seem to be random, sometimes it can be a certain way I move my foot or even my leg (and what causes it once may not cause it again), other times it just comes out of nowhere. I get very little notice, I can feel that part of my foot start to cramp up and a second later it's rock hard and painful. I instinctively angle my foot downward which alleviates the pain somewhat. If I hold my foot in that position long enough it'll slowly go away (I have to be careful, if I start to return my foot to a normal position too soon it cramps right back up again). Once it un-cramps the pain is typically gone, but I can usually feel the muscles in that part of the foot moving for a short while afterward.
It's rather problematic, especially when I try to sleep. I've had trouble sleeping due to this issue before because my feet will repeatedly cramp up while I'm trying to get to sleep. I have no idea what the problem is, I don't think it's pressure related as it happens when I'm not on my feet, even when I've barely used my feet that day. I don't think it has anything to do with shoe size either. Has anyone experienced anything like this before?
It could be a type of faciitis. I have the same issue but it also effects all my toes and down the side. I had a massage therapist work on my feet and we found that the fascia down that side of my feet is very tight. If oyu run your finger down the side of your foot, pressing very hard, you should find the release point (where it hurts like holy you know what if you press on it). You can massage them, roll frozen golf balls on the area, frozen water bottle (though the golf balls are better because they can pin point the exact place). I also massage mine in the bath every night because the warm water warms up the tissue and makes it easier to massage. I've been owrking on it about 2 months now and it is getting better....not perfect, but at least better
I have the same exact issue as you. I was wondering if it could possibly be related to the tear I have in my Peroneaous Tendon which I actually have in both ankle areas. It can feel like a charlie horse in my feet.