Hey @Gulipad,
Welcome to the forum
Do you have a Heroku graph for the number of connected users or page views for the same time period?
Also, is it possible for you to increase the number of dynos or the performance of the dynos? Other users solved similar memory issues on Heroku via that approach Latency on Heroku. Perhaps you simply need more resources.
If that doesn’t solve it and you see memory usage continually rising and not falling please let us know. However from the graph you shared it looks like the memory is rising and then falling.