Defence lawyer Stephanie Burlace said Sayers was trying to find somewhere safe to sleep for the night.
"He hasn't had a home for a while now and has been held in custody for the last two weeks."
Ms Burlace referred to a letter Sayers had written to the judge explaining his situation.
Judge Philip Crayton said he had read the letter and said it was obvious that at Sayers' age he needed to find a job and somewhere to live.
Judge Crayton said he was concerned he would leave the court, still with nowhere to live and repeat the offences.
"He is spending all his money on alcohol and scaring residents by passing out in their backyard."
Judge Crayton said the presumption was if someone is breaking into private property they were usually looking for something to take.
"It would be most unfortunate if you did find yourself back in court for burglary because you can guarantee the consequence would be prison."
Ms Burlace said he had some money but still no address.
"There is the potential for setting him up for failure if we don't get the right sentence."
Judge Crayton convicted Sayers and sentenced him to one month's imprisonment.