My advice is that whe you get insomnia you should just get up and get on with something. It means that you've got a few extra hours of stuff done so you can sleep longer next time you feel like it. It also helps to stop the awful cycle of anxiety as yo've got something else to concentrate on. This appraoch works particularly well with morning insomnia.
(no subject)