In my case, I just ended up doing way too much THC in the evenings and at night so I would essentially pass out. I would sleep, but my sleep quality was really bad and I felt "groggy and foggy" the next day. When I tried to go off it, for a long time I would wake up every night around 3 AM and couldn't get back to sleep.
To be clear, I totally agree THC does have medicinal uses, but lots of medicines can cause a host of side effects and other problems (and sleep medicines in particular are a notorious bunch for dependency issues). If you go the THC route to help sleep, just be more careful than I was.