from a ny times article:
link
Last week I probably slept an average of two hours a night, he [heath ledger] said. I couldnt stop thinking. My body was exhausted, and my mind was still going. One night he took an Ambien, which failed to work. He took a second one and fell into a stupor, only to wake up an hour later, his mind still racing.
Known as a consummate professional, I doubt he would purposely throw two productions into chaos: The Dark Knight (which is in post-production) and the new Terry Gilliam flick (which has been filming for a few weeks). I suspect it was an accidental overdose.