The attempted sacrifice of Isaac is another one of those hard to hear passages. God makes it clear in many passages that he hates child sacrifice, so why on Earth would he ask Abraham to do this thing?
We must remember however that God did not ask Abraham to do anything that he was not willing to do himself when his son was sacrificed on the cross.
Abraham also knew that God, is a God of miracles. He had seen God do wonderful things including making sure that Issac was born to parents that should not have been able to have a child (Abraham was 100, and Sarah was 90).
Right before the destruction of Sodom he also drilled God about the morality of destroying it, and was convinced that God would do the right thing.
He also knew that God promised he would have many descendants via Isaac. Since Isaac had not yet married even though Isaac was almost 37 years old Abraham knew that this would somehow turn out OK.