Garry Kane, 41, who struggled with a heroin problem, is alleged to have killed Kathleen Milward, 87, in the house they shared in Stonehouse, Lanarkshire, on January 3.
The High Court at Dumbarton heard that Kane "burst out crying" when police questioned him over the death of the pensioner.
Police Sergeant Terrence Mulheron said Kane was with his mother in Mrs Milward's bedroom when he told them the house was a crime scene.
He said: "I asked Garry if the front door had been locked when he returned, to which he replied yes. He explained he forgot to lock the back door and burst out crying."
Kane denies murdering Mrs Milward. He denies a separate charge alleging that from Christmas Eve 2011 until her death, he repeatedly asked her for money, and shouted, swore, and called her names. He also denies two charges of theft. The trial, before Lord Matthews, continues.