People use this phrase to illustrate an extended length of time.
It’s believed the saying comes from the idea that dairy cattle let out to pasture may only return the next morning for milking.