What does MariaDB do at midnight?
Hi user1202278 (is that your real name?),

MariaDB does not perform any particular scheduled actions on its own.  There is almost certainly a cron job at work, unless there are users who stay up late every night!

It would be a good exercise to monitor your DB for a while and see how often and when heavy processes are running.  From there, you can narrow down the suspects.  If you haven't already, I would recommend that you invest a good monitoring tool.  I personally use Navicat Monitor for MySQL/MariaDB.  It provides all of the important stats on the Dashboard page and can track server metrics such as disk usage, I/O, CPU, RAM, etc.

It has a 14 day trial, which should be plenty of time to diagnose your issue.

Best of luck!