Insomnia used to be a very real part of my life and my practice in mindfulness was what saved me and continues to from time to time.
How did I do it?
For most of us having trouble sleeping is a mind trap that over time gets conditioned into our bodies as a habit. The trauma of not sleeping is stored in our memories and only serves to make our mind increasingly reactive to the symptoms or anticipations of not falling asleep. It becomes so easy for our anxious or restless mental buttons to get pushed. It's as if you only need to drop the lightest worry of not being able to sleep, like a feather, and the brain begins swirling with anticipatory anxiety.
I was once told that practicing mindfulness was far more restorative than tossing and turning. Therefore, even if you just practiced being present all night long and you didn't fall asleep that was still better for you. On top of that, time spent in mindfulness practice is training your mind in mindfulness which is good for so many other parts of life, not the least of which growing a stronger and healthier brain.
With that I could relieve my worries about needing to fall asleep and just make the night time in bed my time to practice. I would put on my ear phones and be guided with a body scan that can be found on the Gaiam Meditation Studio App. Initially I noticed my mind getting pulled frequently, thoughts that this wouldn't work would yank me away, but I stayed disciplined (as best I could) to gently bring myself back to the practice.
Eventually I was able to let go of the audio and either bring a general awareness to my body each time I closed my eyes noting the field of sensations that were moving around. At other times I would just follow my breath.
But first I needed the support of the audio from the guided meditations to train me to eventually be able to just do it on my own.
It's been years since insomnia has been an issue for me now, once in a long while it creeps up, but I am usually able to dispel it with my practice. Studies show mindfulness helps with sleep in many people.
The key here is that there needs to be the understanding that you're using this time to practice to train in mindfulness, not to fall asleep. If the explicit intention is to fall asleep then you set up a monitor in the back of the brain to continually check on that. You need to let that expectation go, it's okay if you don't fall asleep.
A couple of other tips that might help:
Don't eat a big meal just before bed.
Try to unwind from any work or stress related activities. (There is a "Digital Detox" meditation on the Meditation Studio App).
Take a warm bath.
Listen to soothing music or an interview on Meditation Studio's companion podcast, Untangle. Both of these will take your mind off anything that is causing you stress or anxiety.
No matter what, using it as a time to unwind and to train in mindfulness is a wise use of that time.