The absurdities of "Realm of Fear" notwithstanding, the matter stream is supposed to be the stream of particles that make up the subject, being transmitted through the transporter beam to the destination coordinates. It's literally a stream of matter -- your atoms are disassembled, turned into a stream which travels through subspace to the destination, and then reassembled into their original configuration. It's kind of like sending something through a very tiny wormhole only wide enough to fit individual subatomic particles rather than an intact person.
Essentially there are two key components transmitted through the beam. One is the matter stream, the actual raw material, and the other is the transporter pattern, the information describing how the particles go together to make a person or object, which is recorded when the transporter scans you. Now, in quantum physics terms, particles of the same type are identical and interchangeable; the thing that makes them individual is their particular state. So the information that defines you essentially is
you in quantum terms. So in a sense, the real you is converted into the transporter pattern, an energy matrix in the beam which encodes that information. That would have to be the part that retains consciousness while the body is disassembled. After all, consciousness is information as well, so the mind could be active within the beam just as it would if it were uploaded into a computer. That's my take on what Barclay experienced in "Realm" -- that his mind perceived himself as still having a body because he was experiencing things from within the pattern that encoded all information about his body and mind simultaneously, so subjectively it felt to him as if he still had physical form. And when he sensed the others in the beam, his mind interpreted the sensation through sensory hallucinations.
It's still a dumb episode, but that's how I rationalize it.