WTF leg cramps got anything to do with eating? Yes, it does. I did experience this before… I was awaked from sleep and found out that one of my legs cramped and pained like hell. As a single and available person, I did not do any “heavy workout” before sleeping. It must have something to do with food I took that evening. Even though the actual cause can be many, below are few steps to avoid it.