I wonder if it could be cache eviction? You query runs fast when relevant parts of the table are in cache, and other times,other queries (or system activity) have forced that data out of cache.
pgsql-admin by date:
Соглашаюсь с условиями обработки персональных данных