Yes. OCD can cause Insomnia. OCD is basically like having too many unwanted thoughts that you can't control. If there are thoughts, mind is running. When mind is running, brain is firing signals. We need brain to shut down to sleep. As shutting down doesn't take place, OCD causes Insomnia. And Insomnia will further increase unwanted thoughts.
Next Steps
Please consult your Psychiatrist of you are already taking treatment for something to help you with Insomnia