When you are stable try to meditate on the value of the marital love, and that the sex is part of that. Do not develop a habit, that the desire for sex is result of the mode changes: that is Gods gift.
In other hand if you are single, consider any concupiscence temptation, regardless of your mode. Against the temptations the best remedy is the oral prayer, the Rosary, or the Office if you have access to it. If you fall go to confession as soon as possible. Probably in the status of swinging mode it is not mortal sin, but the confession brings actual grace, which may help with the mode swings too.
I understand that is is easier to say than do, but the path to the heaven is not easy for anyone.