The child was found at this home in Houston, Texas after police received a drugs tip off ABC/Screengrab

A four-year-old boy who authorities believe was forced to live in a rodent-infested closet told investigators his "friends" were the rats and cockroaches who visited him, according to the child's attorney.

Shocking details of the boy's alleged mistreatment came as he was also said to have tested positive for methamphetamine exposure.

Investigators are not sure how long the boy was living at the home in Houston, Texas when deputies turned up on 20 December with a search warrant because they believed meth was being made and sold there.

Attorney Rachel Leal-Hudson told Houston TV station KTRK the boy said he wasn't allowed out of the closet for hours at a time.

"His friends" were the "rats and roaches" that would visit him, Leal-Hudson added.

"He can articulate some things that are really shocking and surprising that tell us he was in there for a quite a length of time," she said. "The detail on this case is very awful. This is a four-year-old child who has seen things an adult should not have seen."

Leal-Hudson said the child talked of sneaking away from the closet and that his punishment was being forced to sit on top of a refrigerator where he was afraid he would fall after nodding off.

A police video of the scene shows the closet crammed with bedding as sex toys and drug paraphernalia are scattered in the open nearby.

The boy's mother, April Burrier, wasn't present when the deputies showed up and was arrested later.

She's facing a charge of endangering a child. She told authorities someone else was supposed to be taking care of her son but couldn't identify that person.

Authorities are still seeking the man believed to have been making and selling drugs at the house.

The boy's father, Robert Dehard, said on Tuesday he left the child with Burrier after Thanksgiving and is now seeking to regain custody of his son.

Child welfare officials said he had previous drug convictions and had refused to submit to drug testing. His custody request has been delayed until next month to await test results.

A Harris County judge Tuesday allowed child welfare officials to keep the boy in their temporary custody while the case remains under investigation.