How do you manage your insomnia if you have it?

Read that 50% of diabetics have sleeping problems. How do you manage yours? Pills? Not taking metformin at night?

I've been waking up at 3 am because of a little noise and then cant go back to sleep till ages.