Yes! The worst time I ever did it was when I was in the midst of making scarves for Christmas last year.
In my dream, I was knitting along (I was making an Irish Hiking Scarf in my dream, heh). In reality I was moving my hands along the top of the sheet making knitting motions, then I would turn my work and twist the sheet, ad nauseum. Finally, I guess when I had the sheet all twisted up, I dreamt I ran out of that ball of yarn. I joined my next ball (the comforter), and started “knitting” that too.
I woke up when my husband pulled the blankets away from me, saying, “Stop already! What the hell are you doing?!” He thinks it’s funny now, but was not happy about being woken up at the time.