Tracey Taylor, 24, of March, Cambridgeshire, was arrested by police nine months after her son, Ryan Hudson, died after being taken ill at school in January last year. She has pleaded not guilty to murder.
The court heard that Ryan was taken to Hinchingbrooke hospital in Huntingdon after throwing a fit at Burrowmoor school. Doctors carried out "a battery of tests", but he died, said Nigel Rumfrett, prosecuting.
Forensic tests carried out on the contents of Ryan's stomach found undigested Dothiepin tablets, a drug prescribed to his mother to treat depression. Further examinations calculated that he had consumed between 10 and 50 tablets less than two hours before arriving at school.
Mr Rumfrett explained that Taylor had been prescribed the drug and collected three bottles from chemists in March in the weeks before her son died.
She told police that she had been alone with Ryan and his sister, Shannon, the night before he died. Mr Rumfrett said that Miss Taylor was therefore the only adult in contact with Ryan at the time he had taken the drugs.
Ryan was "not an easy child" whose behaviour had been so disturbed that he had been given a special needs place at a local nursery.
"He would slap his own face and on one occasion he suffocated the family cat," Mr Rumfrett went on.
On the last day at school, Ryan's behaviour had been so bad that he had missed assembly and spent the time in the "book corner" under the supervision of his form teacher who saw him lying on the floor and thought he was just playing.
"She picked him up and he was limp and unresponsive. She sat him in a chair and he threw a fit, and he never regained consciousness."
Mr Rumfrett said: "Ryan's disturbed behaviour may well have been what caused the defendant to give him the tablets which killed him. Was this an accident, or was he given these drugs to take? That is really the crux of this case."
Ryan's father, Shawn Hudson, found an empty bottle of Dothiepin, which had contained 56 pills, hidden in a chest of drawers at Miss Taylor's home on the day of her arrest, the court heard.
At first she told police and neighbours that Ryan could not have got to the tablets as they were stored high up, Mr Rumfrett said.
But she later said she had noticed six tablets missing from a separate bottle of Dothiepin stored in a gas cupboard in another house in March where the couple had lived.
Miss Taylor told police she had gone to the house the day before Ryan died to collect her post and that he had used the toilet there.
Mr Rumfrett said: "She has, the prosecution say, been vague, inconsistent and downright dishonest in the accounts she has given about what happened to the tablets."
The case continues today.