She's getting ready to lay; her instincts are telling her to find a nest.
I don't know of any way to train them not to lay on the floor. Mine preferred it, so I just put some nest boxes on the floor for them or picked up eggs from wherever they felt like laying.