As a troubleshooting task, I would create a restore point immediately upon boot when the sound is working.
Then be very observant as to what is happening when it quits. When it goes out, attempt a restore. If that works, it is in the registry or a system file.
The next time it goes out, open a CMD window and type ***SFC /scannow***.
If that fixes the problem, then a system file is becoming corrupt.
Now, which file and why becomes your search. Could be an HDD/SSD issue, could be loose connections, could be a PSU issue, could be a program issue.