If you have (non pregnancy related) chronic insomnia how do you deal with it besides taking sleeping pills?

Did you ever see a doctor? Did they help and / or give tips?