After an autopsy revealed toddler Jordan Thompson died with high levels of antidepressant in his system, police found the same drug in Cecil Patrick Kennedy’s home.
Kennedy was looking after the 21-month-old alongside his own child when Jordan's mother, Bernice Swales, went to the shops on March 19, 2005.
She returned an hour later and found Kennedy giving CPR to her child.
Jordan was declared dead soon after.
More than 18 years later Kennedy, now 51 years old, has pleaded not guilty to the toddler's manslaughter.
A video presented to the jury on Monday showed police discovering a paper bag filled with prescription antidepressants in the top corner of Kennedy’s wardrobe on April 8, 2005.
It contained half-consumed boxes of ENDEP 50 and Avanza, both used to treat depression, and antibiotic Doryx.
NSW Police conducted the search after an autopsy, which could not identify a cause of death, showed Jordan Thompson had high levels of antidepressant his blood.
The Downing Centre District Court jury also heard from the toddler's father Paul Thompson, who said the child seemed somewhat lethargic and sick in the days before he died.
Mr Thompson had custody of Jordan on March 16 and 17.
On those days, his girlfriend and parents both visited the home, but the father never left Jordan alone with them.
Mr Thompson also denied giving his son any antidepressants.
The trial continues.