Here "they" refers to the adversaries mentioned in Psalms 74:4.
"They said to themselves" or "They thought to themselves" )