A two-year-old boy died after drinking his mother's methadone from a beaker, a court has heard.
Sally Dent from Belper in Derbyshire, awoke to find toddler Riley unconscious in bed next to her on 13 March 2012.
The methadone was left on some bedroom drawers in "easy reach" of Ms Dent, who was "struggling" with heroin addiction, Nottingham Crown Court heard.
Ms Dent, 32, and Riley's father Shaun Binfield, 44, from Belper, deny manslaughter and child cruelty.
Opening her case for the prosecution, Yvonne Coen QC, told the court Ms Dent had a history of drug use going back many years and was being prescribed methadone to try to break her addiction to heroin.
'Like bee to honeypot'
Ms Coen said leaving the methadone in a child's beaker where Riley could easily reach it amounted to "grave negligence" as he would have thought it was juice.
"Not only would [the beaker] have attracted him to it like a little bee to a honeypot but it was also within easy reach of him," said Ms Coen.
When paramedics arrived at the house, they found Riley lifeless. His heart had stopped beating and his lips were blue, the court heard.
He was taken to hospital but was pronounced dead shortly after arriving.
Tests from a post-mortem examination showed Riley had enough methadone in his blood, stomach and urine to prove fatal. He is believed to have had between 10 and 20ml of methadone.
The couple originally told police Riley must have climbed on top of a wardrobe in the bedroom where the methadone was usually stored in a locked, wooden box, Ms Coen said.
She said Mr Binfield, who was watching television in another room on the morning of Riley's death, let his son go back into the bedroom unsupervised, knowing the methadone was within his reach and knowing Ms Dent was sleeping off the drugs she had taken the night before.
The case was adjourned until Tuesday.