-Coffee will screw with your sleeping habits.
-Going to bed when not tired is bad, it will keep you up and get you into a bad rut.
-Exercise increases endorphins and makes you more relaxed which in turn will make it easier for you to fall asleep.
-Stress will disrupt sleep.
-Clean sheets and pillows help a lot.
-Most people wake up more than once during the night.
-Aim for 8-9 hours of sleep per night.
-Stress is the biggest cause, IMO, of any disease or affliction.
There is a cornucopia of things you can do and try before resorting to meds.
But, personally, I'd say insomnia is, for the most part, due to stress.
The biggest source of stress, IMO, is due to unfinished or unplanned work. When your head is full of these things, you subconsciously stress over them. You can't control this easily; You can say you don't really care about these things but your subconscious is like a mind of it's own and does. I mention this in detail because I eventually found a book (Getting Things Done by David Allen) and it has helped me deal with stress so much that I actually sleep better because of it. A lot better. It shows you how to process work, in any area of your life, how to "remove" things things from your subconscious through action and planning. If you don't like reading, there is an audio version of this book. If you want more details, feel free to PM me I'll be glad to help you out.
Good day!