During those days he went out to the mountain to pray and spent all night in prayer to God.