Stream of consciousness said to be the same as interior monologue
Definition
Stream of consciousness is a narrative device that attempts to give the written equivalent of the character's thought processes, either in a loose interior monologue (see below), or in connection to their actions.  Stream-of-consciousness writing is usually regarded as a special form of interior monologue and is characterized by associative leaps in thought and lack of some or all punctuation. Stream of consciousness and interior monologue are distinguished from dramatic monologue and soliloquy, where the speaker is addressing an audience or a third person, which are chiefly used in poetry or drama. In stream-of-consciousness, the speaker's thought processes are more often depicted as overheard in the mind (or addressed to oneself); it is primarily a fictional device.
An early use of the term is found in philosopher and psychologist William James's The Principles of Psychology (1890): "consciousness, then, does not appear to itself as chopped up in bits ... it is nothing joined; it flows. A 'river' or a 'stream' are the metaphors by which it is most naturally described. In talking of it hereafter, let's call it the stream of thought, consciousness, or subjective life".
In the following example of stream of consciousness from James Joyce's Ulysses, Molly seeks sleep: