Consider taking her to a vet to be evaluated.

There are different reasons why she would be doing this. One is that she may be injured in some way. Another is that she does not have a suitable place to nest and has been eggbound.

A vet can help you rule out (or confirm) injury.