Hello,
Have you been tested for Irritable Bowel Syndrome? (IBS). This can cause the symptoms you are describing. Another condition that cause this, AND the foggy thinning and muscle twitching is Candida, a type of intestinal fungus. I would certainly ask to be checked for it, it can cause so many issues ESPECIALLY the ones you posted. In the meantime, cut ALL sugars, wheat and yeast out of your diet, see how feel after a few weeks, if you feel better, this is a good indication that Candida is the culprit.
Try fiber tablets for constipation. Or see your dr