Sometimes it sucks not being able to sleep, but other times it's when I get all my best story ideas.
I usually have to keep a spiral notebook handy, so I can jot down anything I think of. When I get up the next morning I have to try and make sense of all my notes. Sometimes it isn't always possible. Other times I'm thinking I'm the most brilliant person in the world. Until I realise how many WIPS I already have in the works and then grumble a bit and type up the notes and put them safely away in my back-burner file.
The weird thing is the longer I go without sleep the less tired I seem to be. And the more intricate my story ideas become. Hence the reason I have been keeping better records of all my characters. Keeping track of all the important things in the stories.
The bad thing about insomnia is, eventually I'm going to have to crash. And when I do, it's going to be ugly. I'll end up with the mother of all headaches. Damn, I'm really not looking forward to this, but as a famous bushranger (Ned Kelly) once said━such is life.