This is what I would call 'sitting in a bath of warm marmalade' very sweet but has its bitter side. It is very seductive and it is obvious that you realise the unproductiveness of it.
There are a few strategies:
keenly watch for it, recognise it, and refocus
As you become aware it is happening, allow the body to become more erect and aware - not stiffly erect - but subtly straighter.
Meditate with eyes open for a while.
Stand up to meditate for a few minutes.
Do some walking meditation for a while.
Of course, choose between these - not all in one sit!
You may feel these will throw your rhythm off and leave you dissatisfied with your meditation period, and they will. The end result, however, will be to let the mind know that you are serious about being focussed and the dreamy state will then occur less and less without you having to go to such lengths to refocus.
Of course, it depends on your reason for meditating. If it is just for relaxation, perhaps the dreamy state is not so bad!
peace and joy
H