It took me a long time to figure out how to stay out of my own way in order to stay sober. Understanding the cycle helps. In time i worked out how to recognise times when i was more at risk- feeling good, strong and self assured is now a time I have to take stock.
I also learned that it is better not to run away from boredom and pain- but stick with it and see it through - it works.