jjandharry, first of all I'm truly sorry to hear of your loss. No parent should ever have to bury a child. You have my sincerest sympathies.
I don't know how much to give here so I'll be frank. Heroin overdoses tend to come in two flavours, either an immediate fatal OD with a high dose, or a slower, more gradual sinking into OD territory with something more borderline. In both cases it is completely painless. Breathing slows to the point of unconsciousness, and then stops. Your son will not have known much about it even if he woke later in bed I can assure it, but chances are he simply drifted away his sleep. He would not have suffered, not even the mental anguish of knowing he was sliding towards OD at some point. You tend to be completely unaware it is happening, which is why users are so powerless to prevent it most often. I was not aware with the borderline cases I experienced as an addict anyways, I was enjoying the slide down. I hope that is not more than you wanted, and brings you some comfort. My condolences again.