Why is it that when I pray, read my Bible, and worship God my life seems to be better and make perfect sense?

Why is it that when I pray, read my Bible, and worship God my life seems to be better and make perfect sense? But the moment I fall astray things turn into chaos. My life seems to be blessed beyond measure when I get in tune with God, but boy can it get bad when I do my own will. Can anyone relate?

one day i start to think in this way…i started to believe God more, the Lord became more real to me…this is an amazing thought, it means the Lord is so real not fake…but True