The boy, who was aged four and five at the time of the cruelty, was attacked with a metal stick and beaten with a shoe, causing a head wound that was glued together by the women.
The women, who cannot be named for legal reasons, were described as “wilful and callous” as they were jailed at Bradford Crown Court.
Judge Peter Hunt said the 40-year-old mother “chose to look the other way”, doing nothing to stop the cruelty of her friend, 29, who carried out the assaults.
He said to the younger woman: “Your relationship with (the boy) was highly dysfunctional. Despite the fact you were not a parent, you took it upon yourself to mete out punishments to him of a very cruel nature indeed.”
The judge continued: “I’m in no doubt at all you were the dominant personality in this relationship. You were the perpetrator of these cruel acts, so you must expect to serve a longer sentence than your co-accused.”
Speaking to the child’s mother, Judge Hunt said: “As his mother, you were meant to be responsible with the duty to protect this child.
“You chose, in effect, to look the other way and failed to intervene. Knowing and seeing how (your friend) treated your son, you did nothing to prevent (your friend’s) cruelty to him.”
Both women were convicted of two counts of child cruelty, while the 29-year-old was also found guilty of two counts of unlawful wounding.
Judge Hunt sentenced the mother to two-and-a-half years in prison. Her friend received a four-year jail term.
He said the cruelty showed the “wilful and callous sides of the personalities of both of you” and added: “People who behave in cruel and violent ways towards young children in their care must expect to serve prison sentences of significant length.”
The trial heard how the friend forced the boy, who had been stripped of his clothes, into a cupboard and left him “stranded, helpless” for several hours while the women, and his sisters, went on a day trip to the seaside.
Judge Hunt said: “To be confined for hours in a dark cupboard was a frightening and bewildering experience.”
On another occasion, the woman used “considerable violence”, repeatedly striking the boy with a metal stick or rod, causing up to six wounds which required stitches at hospital.
In a separate attack, she struck the boy on the top of his head with the heel of her shoe, causing a wound. She then applied glue to the wound in an attempt to cover up what had happened.
Judge Hunt said the boys’ sisters witnessed the cruelty and were likely to have suffered psychological harm as a result. One sister was blamed by the women for one of the assaults.
In mitigation, barristers for both women said they had lost their good characters and their jobs as a result of their convictions, while the mother had “lost everything”, including her children and her family.
Speaking after the sentencing, Detective Inspector Mick Ryan, of West Yorkshire Police, said: “These were appalling crimes committed against an innocent young boy who had no means of defending himself from people he knew and trusted.
“His mother, who should have protected him, instead was compliant in her neglect of his welfare. The physical assaults he suffered can only be described as barbaric and vile.”