A man who killed his ex-girlfriend and left her body to rot upside down in a wheelie bin made a disturbing confession to his cellmate, a court has been told.