It is possible, based on some evidence, that magnesium and vitamin D deficiencies may contribute to fibromyalgia. However, additional studies are needed to show how other factors influence its development.