I have been telling people about magnesium for 10 yrs on, well, the um...orange kool aid site...
I ate about a thousand bananas trying to get potassium, only got the running crap shoots, still had cramps. Bananas just gave me stomach cramps with my leg cramps so I walked funny and bent over holding my guts. Bananas are great for constipation I now know. Funny thing is Magnesium can cause constipation.
Pickle juice only works if you drink it for several days before you ride. It takes awhile to build up in your system. Not sure if pickle juice has both magnesium and potassium, or just one. Actually, any supplement takes several days to fully assimilate in your system. I think Mustard has potassium too?
Most people with severe muscle cramps are actually low on potassium, not magnesium, but you don't know until you experiment.
I take alot of Rolaids, Omeprazole, and other stomach acid remedies, which I learned when I got stomach cancer, all cause you to be low on Magnesium and or Calcium! Rolaids have calcium and magnesium in them, but not enough to replace what is lost from the antacid.
By the way, if you have severe ongoing acid reflux, ask your doctor to test for "Barrets Esophagus". It's a pre cancerous condition. When I got scoped they found that, 3 ulcers, a damaged Pyloric valve, and a few cancer cells. My doc didn't agree that straight whiskey should kill it. But I keep trying anyway.
Oh, I also learned that heavy drinkers often are low on Potassium and Magnesium! I'm not a heavy drinker though. Not by Irish, British, or Scottish standards anyway. But I did cut back a bit. The doc said dark beer was the easiest on the stomach, but also has the most calories.
I'm cheap, so I hate to buy magnesium tabs which are expensive for the good ones, and I finally ate all of the side cases off my old 84 Husky, (magnesium cases), and people look at me funny when I lick batteries, so I just take 2 multivitamins a day starting 3 days before I ride. On the day before I ride I take one in the morning, one at night, one with Breakfast before I ride, and one right before I ride. Seems to give me all the Pot and Mag I need.
I chase the big horse pill vitamins with dark beer. Makes them go down easier.