This is Lady's Bedstraw, Galium verum. It has dark glossy 'leaves' which form whorls of six to twelve up the stems. In fact they are not all true leaves, which occur as opposite pairs; two are leaf-like stipules.
The leaves, on close inspection, are mucronate (end abruptly in sharp pointed tips).
It was, indeed, used to stuff mattresses, the coumarins in the plant acting as an insecticide against fleas.
The yellow flowers were used to curdle milk and gave traditional Double Gloucester its colour.