Police found 81 illegal photos and videos when they seized two phones from David Cooper in November 2019.
Newcastle Crown Court heard an investigation into the devices also found he had distributed dozens of these images in conversations on the Telegramssaging service.
Cooper, who has never had any issues before, was released under investigation.
The court heard in June 2020 that officers had paid him another visit and he claimed the only phones he had were still with the police.
But when an officer dialed a number that police had been told was his, a phone started ringing from inside his mattress.
This time, a total of 454 illegal photos and movies featuring children were found on the phone, along with an extreme pornography image showing a woman having sex with a horse.
Cooper, of Dellfield Drive, Sunderland, admitted to making and distributing indecent images of children, possessing extreme pornography and possessing a small amount of amphetamine found during the second raid.
The 32-year-old claimed he was “tricked” by a man, who posed as a woman, to distribute the footage.
But Judge Edward Bindloss said Cooper ‘in cold blood’ swapped them and told him: ‘It seems to me you have a sexual interest in the children.’
Judge Bindloss sentenced him to a total of 18 months behind bars.
Cooper must sign the sex offender registry and abide by a sexual abuse prevention order for ten years.
Prosecutor Rachael Glover said police made the first visit to Cooper’s address on November 12, 2019.
On two cellphones, officers found 24 images and one Category A video, which is the most serious, 46 images and one Category B video, and 9 Category C images.
Miss Glover said: ‘The age range of children in these images ranged between four and 15, but the majority are children between seven and nine.
Miss Glover said Telegram messages showed Cooper sent 40 images to an unknown contact, discussed exchanging images with another person and sent 31 videos to a third.
The phone seized on June 20, which was inside a mattress, contained 229 Category A images and 23 videos, 109 Category B images and 14 videos, and 69 images plus ten Category C videos.
It also contained the image of extreme pornography featuring the animal.