Magnesium is an important mineral for the body. It helps maintain nerve, muscle, and bone health. It may also help improve sleep quality, lower blood sugar levels, and lower inflammation. Foods high in magnesium include dark chocolate, nuts and seeds, avocado, tofu, leafy greens, and bananas. Magnesium and vitamin D enhance each other’s absorption in the body. Magnesium is needed in many body processes that activate vitamin D and help to improve vitamin D levels in the body.