One thing that can cause that is Bipolar.
Rapid cycling BP is when a person switches a few times in a 6 month period. Then there is Ultra radian which can even be mood swings (switching) several times a day.
It can have elements of a mixed mania were there are constant racing thoughts, and so...