I think most likely you just thought you were sight reading, and really what you were hearing was completely different. Or, the notes arranged themselves to fit the music you were hearing.

Its just like reading a book in a dream. You may be able to think up a pretty good story, but it wont already be writen in the book and stay written. The words will change as you ar reading it to make it make more sense (even though books dont make sense in dreams).