I came up with the line in question. It's grammatically sound, and the "I'd" (which as Elle Joyner pointed out is shortened form "I had" for the sake of aesthetics) changes the meaning of the sentence a bit from what it would be if that was just "I" instead.
"I had <past tense verb>" is the past perfect tense, which indicates that an action was finished at some point in the past before some other past event occurred. It's saying that at the time being spoken of, it felt like the speaker had already possibly slipped, tripped, and fallen into a pleasant dream before whatever strange event provoked the thought. It sets out an implied timeline in the past: fell into pleasant dream THEN other thing that belongs in a dream happened. Even if the event that sparks the line of dialogue comes first in the story, it'll be clear which order things happened in.
Just using "I <past tense verb>" there, on the other hand, would be a little weird because it would be lacking that sense of order of events. It would be like they're saying they fell into a pleasant dream AND other thing happened, because there's no sense of one coming before the other. Confusion is unlikely given this particular sentence, but whenever you're trying to say one thing in the past happened before other things in the past then the past perfect tense is preferred. Not using it here would not be incorrect though, just less clear, in my opinion.
*takes off grammar nerd hat*
But it's all good, tweak it a bit if you don't like the past perfect tense version. The challenge is making use of these lines as dialogue, not in maintaining their exact grammatical structure and making it fit in with the rest of your writing. :D