We’ve mentioned that nuts are rich in magnesium, which is important during a keto diet, but they are also rich in selenium, with powerful anti-inflammatory properties, and potassium that is also hugely effective in preventing muscle cramps.