Lord have mercy!
I hope that God will know who I mean if I use your user name.
My husband was a smoker as well, and its been a 3 year journey for him to quit completely. He only has me his accountability partner (not the most healthy thing when I'm living with him, but his friends and co-workers are enablers

) and I've seen just a bit of how tough it is. Even once you get past the physical addiction, the psychological addiction, the feeling "I SHOULD be having a cigarette now" is difficult to break.
He still has those moments, like your 2:30 AM moment, once in a while.
Keep Him near and try to deepen your prayer life, which will at the very least, occupy more time in your day. If you have an accountability partner, that might help too. I know that this is easier said than done, and you probably know this, but as I say, "A Christian life is knowing what's right yet needing to hear it over and over again because we can't get it the first time."