Before the lamp of God had gone out, Samuel was lying down in the tabernacle of the Lord, where the ark of God was located.