stream of consciousness

a manner of writing in which a character’s thoughts or perceptions are presented as occurring in random form, without regard for logical sequences, sentence structure, distinctions between various levels of reality or the like.