Lying down reduces circulation. Dehydration and electrolyte imbalance also contribute. Regular stretching and magnesium at night helps.