I don't know what she has been tested for but I wanted to mention some things to consider.
Low vitamin D can cause "growing pains" and trouble sleeping, and is increasingly common in our society due to sunblock use and time spent indoors. I've had personal experience with aches and pains and insomnia caused by low thyroid.
Sensitivity to gluten can cause migraines and gastrointestinal symptoms. Also a higher percentage of those with migraine disease have low vitamin D and celiac compared to the general population. For me, getting my vitamin D levels in range and going on a gluten free diet reduced my migraine frequency and intensity.
If she were my child I would want at least a vitamin D test and celiac screen. And maybe a thyroid screen too.
I would also suggest counseling for the anxiety and any issues that might be stemming from the divorce. If money is an issue many churches have free or reduced programs for kids.
Good luck.