Cannabis can help with insomnia in one of two ways; firstly, through the workings of the cannabinoid CBD. This compound acts on the endocannabinoid system (ECS) by increasing the concentration of anandamide (a cannabinoid naturally produced by our body). This process, in turn helps to regulate our natural sleep cycle. THC is also known to have relaxing and sleep-promoting effects, by binding to the CB-1 receptors of the ECS, however, in high doses and long-term use, THC may (on its own) have negative effects on our sleep cycle. The terpenes Linalool and Myrcene also have sedative effects and aid the working of CBD and THC through the Entourage Effect. Secondly, both THC, CBD and the terpenes linalool and myrcene have pain relieving and anti-inflammatory properties, which can help to reduce the reasons why you might experience an imbalance in your sleep cycle.