That depends on the area and version of the tradition. I'm not personally aware that any tradition put the children in bags, but Knecht Ruprecht is more prominent in German traditions and would put rods for parents to beat their naughty children with in their stockings, while Krampus is more prevalent in eastern alpine folklore and would actually beat children in some versions.
But I didn't personally grow up with any of these traditions; my parents put little stock in them. I just know that saying from my mother.