The boy arrived at hospital with head injuries on 2 June, Warwickshire Police said.
The pair claimed he had fallen off a chair, according to the force, but video evidence showed he had climbed out of an open window and fallen.
Forensic investigation of blood taken from Hayward and Brock showed the presence of benzoylecgonine – a chemical formed as the body breaks down cocaine – and police said that showed they had both been under the influence of, or were coming down from, cocaine at the time the child hurt himself.
The pair pleaded guilty in December and were sentenced on 26 April.
An investigating officer from the force’s Child Abuse, Trafficking, and Exploitation (CATE) team said: “Brock and Hayward need to seriously consider their responsibilities if they are going to be looking after children in future – I hope they will use their time in prison to reflect on their failure to protect the child from the harm suffered.”