I can't say that this is what is happening to you but I can say the following about myself. I went through a period like this not so long ago, I too believed it was an attack. During my prayer life in the day I decided to order any demons surrounding me away in the name of Jesus and asked Jesus to escort them away. I proclaimed pout loud in my house that I belong to Jesus Christ. By the way there were more than just dreams going on fwiw. During the night when I wake up to roll over or if to make a 1 am pee call, I keep God at hand and shoot a prayer off of thanksgiving and praise for what ever in my life , I just pick any item at random. The dreams stopped. All are not perfect dreams but they aren't dreams of demons or sinners sinning either. Some are great dreams. I seemed to get attacked most when I had just come out boldly for Christ, perhaps the day before or two days before. Even here in the forum, I have expressed boldly that someone needs Christ and I'd get one of these dreams. Satan hates Jesus. I've heard from many pastors that this is not uncommon.
Most common for this was the 3 am hour or there abouts but that is also the time I have had prophetic dreams too. I say I believe it was an attack because two times in dreams I found myself pinned to the bed by lanky looking demonic creatures and when I awoke my shoulders were still feeling the pressure though the demon was of course gone. I was never scared, I knew this was against Christ and my position in Him.