An effective bedtime ritual marks the transition from day to night, from activity to rest, and so it prepares you for sleep.
Don't take poor sleep lying down. A good night's sleep needn't be elusive; a little preparation goes a long way.
Obstinate problems that resists solutions can be made worse by the very things you do to try and fix them. Insomnia is a good example of this.