Pretty much any ETL tool you like could do this, as long as it speaks to elasticsearch and postgres.
Logstash (if you're using the ELK stack) can write to CSV or other formats as well as do any processing, but it doesn't have a JDBC output plugin, so you'd have to ingest with something else. Conversely, fluentd for example can output to Postgres, but doesn't have an elasticsearch input (at least that I could find), so you'd have to export from es with something else.
So it might be a couple of steps, though there are rich clients for most major programming languages for both elasticsearch and postgres. If your schema is fairly simple, this might not be too bad to roll your own.
That said, the hardest part is likely massaging your data, if your elasticserch schema is complex. Because you have to totally denormalize things for es (generally), you might have to unravel some of that going back into a relational database.