There's another, slightly more disturbing theory for why exercise helps stave off relapse—that working out helps people (and rats) resist drugs because of its similarity to those drugs. Have you ever felt irritable after skipping a yoga class or two? Or a little depressed and lethargic when you don't have time for the gym? These might be construed as withdrawal symptoms—the eventual outcome of an activity or habit that mimics, in some important ways, the effects of morphine and cigarettes and dope.
It's an interesting question. I've worked with women who have had extreme cases of exercise addiction and I've also worked with many people with substance use histories. If I were to read transcripts of our discussions with one or another of these types of clients, and the transcripts were scrubbed of the words "exercise" and "drugs", I'd be hard pressed to tell who was talking about what. The addictions are scarily similar.
Give this article a read and follow-up on some of the links therein. There is a raft of research on exercise addiction and its harmful effects on the body and the mind. As with many things, it's all in moderation.