A snail or a slug leaves a "slime track" in the garden. We have found similar, but very thin, tracks on our dining room carpet in one corner but occasionally stretching right down one side. We have never managed to see or catch whatever is doing it.
We have removed all cardboard boxes etc and vacuumed very thoroughly but still they come back overnight. Can anyone tell us what does this and so give us a clue on how to get rid of it please ?
My suspicion is that you have a slug somewhere in the room. Something similar happened to me a few years ago and it was very difficult to find. I eventually found a leopard slug at the back of the TV cabinet. It may well be on the underside of a piece of furniture. It's unusual for this to happen as slugs generally don't survive in a modern house because it's too dry and warm.
Two things you could try are (a) coming down in the night to see if it's wandering about, and (b) putting a dish with water or a bit of catfood out which may attract it. (Sometimes when I feed my cat outside there are slugs in the bowl the next day. Just an idea, no guarantees). It may be getting in through a gap in the woodwork, under the skirting, or similar, especially if you have an older house.