And as if that wasn’t enough, not getting enough magnesium—even if you’re not technically deficient—can set you up for issues like migraines, sugar cravings and insulin resistance, trouble sleeping, anxiety, and more. Here, we’ve ranked the nuts and seeds with the most magnesium (per 1-ounce serving) so you can supplement the natural way: