Your monthly cycle can be disrupted by hypothyroidism. If your dosage wasn't adjusted properly or you weren't absorbing it adequately, that could have had something to do with not having it. It's possible that going to compounded medication got rid of some of the fillers/binders in the other med and you're getting better absorption of your med, which may have increased your hormone levels, thereby bringing back your cycles.
Exercise used to help alleviate my monthly cramps.