I think that the strategy is to set a budget in order to know where you want to be. You may reach your budget or not, if you do that doesn't mean you have to leave the table. If you are playing well you may continue, until you feel your "lucidity" has ran out. However for some people is hard to measure the level of lucidity, but it's quite easy, you have to report to yourself quite often, speak to yourself if you are playing well, reading players efficiently. Actually a good way is to note if you are loosing the showoffs, that simple. If you are you retire.
Going back to what i said at the start, the budget. If you don't reach it and you feel your lucidity is out, simple you retire. With things like this you don't have to think twice, because if you do and decide to stay there is a big chance you end up loosing your stack.
And one more important thing to said which should be quite obvious but almost nobody follow it, if don't feel smart/lucid don't play! Do something else, go to run, i don't know, there're plenty of things to do in life and by doing them you won't forget how to play poker, actually you will play more efficiently.