I've come to the humbling realization that training the mind needs to be done constantly, not just when we sit in meditation. If, throughout the day and amidst the manifold duties that Lay life requires of us, you can regularly 'check in' with the mind, and examine it, asking: "Where is my mind right now? Am I just with my current task, or are there other trains of thought taking place, also? Do I need to be thinking so much, whilst doing an ordinary task? Could I maybe just wash the dishes, focussing on just getting them done nicely, instead of letting my aversion to the mundaneness of this task make me daydream, not really here, nor really there either, but in a kind of dull stupor?" ...and so on. It's an acquired skill. But here's the good bit...I am finding that, the more I can train the mind in this way throughout daily life, the better is 'behaves' during sitting meditation. If throughout that day you kept placing awareness back into where you are, and on what you are doing, then ime sati-sampajanna has already been getting a decent 'warm-up' so that, when it does come time to sit, you are not having to drag the mind out from the mud of a dull restlessness, into the brightness of alertness all at once, but are already somewhat alert. The mind will do what it has been trained to do, imhe. But it's a long-term process, and not only consistent effort, but patience will be needed.
That's my current understanding of this issue, and my current challenge, also. Hope it adds something of value to the good advice already given.
When this is, that is.
From the arising of this comes the arising of that.
When this isn't, that isn't.
From the cessation of this comes the cessation of that.