This is probably just coincidence, but throwing it out there. Apparently, he suffered large sleep problems because of trying to get into the character of The Joker:
"He [Ledger] tends to do that. He is here in London filming the latest episode of the “Batman” franchise, “The Dark Knight.” (Mr. Bale, as it happens, plays Batman; Mr. Ledger plays the Joker.) It is a physically and mentally draining role — his Joker is a “psychopathic, mass-murdering, schizophrenic clown with zero empathy” he said cheerfully — and, as often happens when he throws himself into a part, he is not sleeping much.
“Last week I probably slept an average of two hours a night,” he said. “I couldn’t 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."
So, he is sleep deprived and had trouble, even with drugs, falling and staying asleep. Then he is found dead because of an overdose of over the counter sleeping drugs. Could he possibly have just been trying to get to sleep, but was unable to after playing The Joker, and tried to take too many drugs to do it?