If you have no issues in Windows it's not a hardware issue . Did you overclock the RAM using XMP memory profiles or change memory timings? Have you checked your system temperatures running wither OS? Make sure your bios are correct too, load the optimized settings in the boot menu and then adjust per the first post.
Just a quick note, and not necessarily related to your restart issues, the 970EVO Nvme drive you are using eventually will begin to take longer and longer to boot due to an incompatibility with that model drive and how OSx performs trim commands. You can supposedly have data issues too and outright kill the drive reportedly. I would replace it when you can, the 980 you have shares the same issues (I've used both but not anymore). See the link below. I've switched over to Western Digital SN770 and SN750 models and had no issues.
Guide Anti-Hackintosh Buyers Guide (link) After our discovery of a severe bug in the TRIM implementation of practically all Samsung SSDs we spent time investigating which SSDs are affected by all k...
github.com