Treatments for insomnia will often improve by making changes to your bedtime habits. If these don't help, your GP may be able to recommend other treatments. If you've had insomnia for more than four weeks, your GP may recommend cognitive and behavioural treatments or suggest a short course of prescription sleeping tablets as a temporary measure.