Sloth and torpor always come because you have been controlling so much. You've been doing so much your mind is actually tired, and worn out. It wants to rest; it wants to turn off because it has no energy left. So if sloth and torpor is in front of me I just put peace between myself and the sloth and torpor. I do not put one of the first two hindrances between me and the sloth and torpor, I don't put desire, ill will, or fear there, and I have no sense of shame because I'm tired. It's just the body that's all. It's just the mind that's all. It's the five aggregates doing their thing, nothing to do with me. So I never feel any sense of self with the sloth and torpor that comes up from time to time.
Make peace with it, allow it to be, and let it go. Don't fight it, and by not fighting it, you're not cultivating the first two hindrances. Because Im not cultivating the first two hindrances, mindfulness starts to grow in intensity. And because I am not feeding this doer, the mindfulness gets all the energy, the knower gets all the energy. The knower is mindfulness, and Im energizing mindfulness.
Do your best to practice your meditation without any goal or destination to be fully in the present moment. A mindful breathing practice can also be an easy way to make peace with and overcome feelings of sloth and torpor.
Sloth and torpor don't last very long these days, I work so hard and sometimes can't find time to sleep. I should be the monk nodding most in this monastery due to the amount of work I do, but I find I can go on retreats and sit in front of hundreds of people meditating and I feel awake. The reason I can do that is because I don't feed the defilements. Mindfulness is right there, not on the sloth and torpor, not on the knower, but on what I am doing with the sloth and torpor. Am I reacting with controlling? Am I just being one of the allies of Mara, the great controller? I don't do that; I put my mindfulness between the sloth and torpor and the observer, making sure I m being kind to the sloth and torpor. Kindness overcomes the ill will. Too often when you have sloth and torpor it is aversion that feeds it. It is the thought , "I don't want it", that actually feed sloth and torpor and makes it last longer, because it is taking the energy away from knowing.
Check out the below video on a dharma talk on on how to deal with listlessness and drowsiness when they arise during meditation.