I have a problem with racing thoughts at night, they usually make no sense but its enough to keep me awake all night. For example: I’m a programmer and during the day I learned some algorithm with many steps. At night my brain kept repeating the steps of that algorithm (with images of these steps in my mind), but none of it actually made any sense and it felt like a weird dream. But I knew I was awake and could open my eyes at any momet. I often hear that people with anxiety have racing thoughts at night, but I don’t understand if by racing thoughts they mean willing thoughts. Because everytime they happen to me at night, it doesn’t feel like I am willingly thinking them and they don’t make any sense. It almost feels like something my brain does automatically, like breathing. I do have symptoms of ocd but I’m not sure if its anxiety or something else. I’m on lexapro now and it helped me with my mood and irrational fear during the day, but nothing seems to help with my sleep. I just want to find an answer to what might cause them. Does anyone have a similar experience?