Depends on how severe is your case. If it occurs few times a year then there are some techniques:
- Don't use phones/tv 1-2 hours before sleep
- Use twilight app on your phone to dim screen to yellow(blue light is bad for sleep)
- Dim your bedroom as dark as possible
- Use white noise generators(there are apps for that)
- Do meditation(at least a month, to see effect)
- Exercise - get your body exhausted
BUT, if it happens a lot, then there has to be a reason for it. Don't wait and get help from psychiatrist or a sleep doctor. There can be many reasons why you can't sleep - don't wait, sooner you reach out the better :)