My experience has been that all potatoes do not grow 'UP" along the vines. Mine all stay underground. The hay, or mounding, helps prevent the potatoes from being exposed to light, which can result in a "green" potato that develops solanine, which can be poisonous. You need to prevent them from being exposed to sunlight, so mound with dirt or hay.
When they start to flower, they are beginning to set fruit, and you can start to harvest new potatoes. Let them grow longer for larger potatoes.