As a situational thing, I'm sure it would work. Since your problems with sleeping come from racing thoughts I think it could work as a long-term solution too. But I think you should at least consider other types of medication for your sleeping problems instead. In my experience weed is a much better short-term than long-term solution to most problems it can help you with. But in my case it definitely helps with racing thoughts. However, it is addictive, maybe not very addictive, but depending on how much you like it, it could very well become a problem for you.
I do bipolar meds and cannabis, and it's not a big no for me (not anymore). I really think I need it, and that it does help me. Yes, it makes me tired, but it also makes me function. It helps me in a lot of ways, not sure if I would use it if it only helped me with racing thoughts. Probably depends on how bad it is and how much cannabis helps. Cannabis can make you more unmotivated and give you "lack of action", yes. At different times I've been smoking from 1/2 joint a day (i.e. not every day) to 5 joints a day. I see a noticeable difference in motivation, but not as much as from my antipsychotics. Also, I think there is an interaction here.