B.K.
My cat was doing the same thing a year or so ago. Turns out she had a raging bladder infection that was making her miserable. Try the vet first. If it isn't an infection or something medically wrong, they can also talk to you about behavioral meds.