There was the dream itself, and there was a memory connected with it that had swum into his mind in the few seconds after waking.
Тут был и сам по себе сон, и воспоминание, с ним связанное, - оно всплыло через несколько секунд после пробуждения.