Quite easy to see how this was an accidental overdose.
Doxylamine is an anti-allergy pill, while Alprazolam is an anti-depressant. Taking both at once is not unusual. Hydrocodone and Oxycodone are both painkillers which carry a risk of chemical dependence. Diazepam and Temazepam are both powerful soporifics. The evidence points to a man suffering from depression, sleeping problems, and chronic pain.
All of these drugs are prescription-only, so at some point his doctor must have felt it necessary to prescribe them. Most of them can be combined without danger. Ledger was obviously careless (or didn't care?) and took too many at the same time; perhaps as the result of dependency.
He said while no medications were taken in excess, his son's death "serves as a caution to the hidden dangers of combining prescription medication, even at low dosage".
"While no medications were taken in excess, we learned today the combination of doctor-prescribed drugs proved lethal for our boy."
[...]
The pain killers, oxycodone and hydrocodone are opiates, which are dangerous when combined with anti-anxiety medicines like diazepam, alprazolam and temazepam.
ABC.
So it was just an ill-judged combination.