It seems that with me, eating either cooked or raw onions prior to sleep will trigger a leg cramp in 4 hours. If I than take two (2) OTC Potassium pills they eventually alieviate the pain. I also note that the cramps are reactive to quantity. Small qty: cramp from foot to shin, lg qty: shin to thigh.