I have seen this sort of situation before. Adult male, relatively young, given the poor diet, poly-sub abuse (multiple substance use, alcohol, weed, etc...), lack of exercise, and excessive chronic/acute stress, his immune system was likely quite beaten up. It is highly likely that he had acute viral myocarditis, which, given his other risk factors, was enough to precipitate a myocardial infarction (hear attack). It is rare, but it can happen to anyone with a relatively unhealthy lifestyle at any age between mid 20's and 40's that contracts a common virus that infects the myocardial tissue. There is a really good chance he didn't feel well, went to sleep, experienced an arrythmia in his sleep, which caused an MI, that ended in cardiac death. It is highly likely he wasn't awake, never experienced any pain, and passed peacefully in his sleep.
It is a sad outcome, but is a 1-2% risk in any youngish person that gets a viral infection with certain viruses and has an unhealth lifestyle with lots of stress. This is why we all need to take our health seriously. Eat well, exercise, avoid alcohol and smoking anything as much as possible, maintain our mental health if we are well in that respect, or see someone if we aren't, and see our primary care physician once a year for a well visit (you may not think it is necessary, but it can catch things that you aren't even aware of that are a problem and you can get them under control/treated before they become a serious issue). Remember, if you aren't taking care of your health, than no one is. This has been a Kiwi Health Advisory from the Committee For Healthy Kiwi Living.