It looks like your server might be experiencing a memory issue.
Could you check the /var/log/syslog for any entries related to "OOM" (Out of Memory) or "out of memory"? This could help confirm if memory exhaustion is causing your Node.js project to restart at midnight.