I have a long exhausting battle with insomnia at least once a month or so. It's really not as bad as it sounds because it tends to hit me on nights when I don't have to get up for work the next morning. I have done some snooping around online and found that a lot of the things that are a part of my nightly ritual are actually talked about online.
Each night before bed I lay down with the lights off and listen to music. My mind wanders then and I find myself relaxing from the stresses of the day behind me. On nights where I don't have to work the next morning, I will either lay my clock face down or shove it in a drawer so I don't lay awake looking at the time. If I don't see it then I don't worry about the time.
I always keep a note pad by my bed to write down my dreams, but there are times where I will sit up and write whatever is in my head to clear it out. My problem is that I have so many things running through my head, stories, etc.. my head is filled with them.