Why am I being treated for bipolar with epilepsy medication?

I have been treated with two different epilepsy medications because I have bipolar. I'm just wondering what epilepsy and bipolar have in common…if anything?