When you say you cannot sleep, do you mean you didn't fall asleep for full 3 weeks a single time?
For me it was more of a realization it was my diet. I changed my diet to remove some particular types of foods and now I sleep good. If I eat those foods I sleep like crap. Pop a tums and I am good (it is the upset stomach waking me randomly, so the bad sleep). Everyone has different reasons why. But the top ones are typically stress, injury, or food are a good place to start.