A 39-year-old man confessed to killing his wife with a hammer and hiding her corpse in the attic for a week.