If you find it difficult to sleep check what Nadi is the most active for you. You do that by closing off one nostril and breathing through the other. If one is more open thus its easier to breathe through one nostril over the other, than the open nostril is the more active Nadi. Sometimes our nostrils have equal flow and then there's an equal flow in the Nadis but sometimes one Nadi is more active than the other, either way is normal.
The left nostril is connected to the Ida Nadi, the Lunar Nadi. This is the Nadi you want to have more active if you're trying to go to sleep. The lunar energy is more introverted and more applicable for sleep or meditation, for going inwards.
The right nostril is connected to your Solar Nadi and is called the Pingala and has a more active energy that applies better to external tasks and being awake in the world.
If you're trying to go to sleep and you notice that the right nostril is way more open than the left. Just rest on your right side for a while and soon you will notice that the energy will shift from the right towards the left and you will have an easier time to rest and go inwards. What you're doing is simply "blocking" the flow on your right side by lying on that side so that it moves over towards the left instead.
You can do that opposite if you find it hard to wake up, see if your left side is more active than the right and if so. Lie down to rest for a while on your left side and the energy will soon move over to the right.