Thanks for your replies, Zilsniggy.
I should have blood tests in order to check electrolytes. I intend to do it (maybe I'll wait a little just to see if COVID situation is somewhat controlled where I live). I've been thinking about that, yes, and certainly at least magnesium had to do with my cramps, once as I raised my Mg intake things got better. But there may be other things with the wrong levels. I've noticed since about a month ago two episodes of swollen feet, both were gone after a fews days. Never had them before. I understand that, among many other causes, dehydration and unbalanced electrolytes could be behind it.