If I understand you correctly, you were taking Depakote for both mood and migraines and then switched to Topamax. On Topamax, the side effects are positive and the migraines are under control; however, you are still experiencing agitation. Correct?
So, to answer your question, YES it is okay to take Zoloft with Topamax, assuming you are not on any other medications. Zoloft is an SSRI, thus inhibiting the reuptake of serotonin. Topamax is an adjunct anti-epileptic, thus enhances inhibitory effect of GABA, blocks excitatory effect of glutamate, blocks Na+ channels, reduces Ca++ channel activity, and inhibits carbonic anhydrase activity.
What does that mean to you—there is no interference and they do not affect each other. However, both meds do cause common side effects of sedation and stupidity, which may intensify in combination.
I wonder if increasing the Topamax dosage by 50mg daily might be a better alternative. Topamax calms neural activity...hence its anti-epileptic class and since you are not experiencing depression, but agitation, it is worth a try.
Whatever you decide, consult with your doctor first. And note, that it can take 4-6 weeks for Zoloft to reach a therapeutic blood level, as this med must be titrated up in small increments.