My mom's dog Brandee still does that and she's 9 years old. She'll be laying down, but her legs move like she's in full stride, she barks, growls and sometimes whimpers. We just say she's in REM, slowly wake her up and then she's fine.