Welcome to the MedHelp forum
Unexplained aches and pains coming on and off could be due to fibromyalgia, chronic fatigue syndrome, rheumatoid arthritis, lupus, Crohn’s disease, H pylori infection, anemia, liver disorders, diabetes, hypothyroidism, Vit B12 or Vit D deficiency and due to calcium or magnesium deficiency. It can also be due to sleep related disorders.
Do discuss this with your doctor and get yourself examined. Take care!