Sounds like an animation problem. Are you running any mods which add/change animations? Are you running Liztail's animation kit? If you are, there is a 'fix animations' function. I'd try using that.
If you want to know what is probably causing it:
If your companions are humanoid and not beasts, it is probable the xbase_anim.kf for males and/or the Xbase_anim_female.kf has/have 'toe' or 'tail' bones in their skeletons that essentially shouldn't be there. I'm not completely sure how they get there, or what Liztail's animation kit does to make them compatible, but I've had this issue with everything from skeletons to dancing girls and the problem is always extra bones.
EDIT: To avoid misunderstandings, I want to make it very clear: I am in no way blaming Liztail's Kit or advocating its use; I'm just stating my experience with using custom animations. I have personally solved this problem with the aforementioned .kf files by deleting the extra bones in Nifskope; however, unless you have some knowledge of that program, it's better to either use Liztail's Kit or have someone else modify the files.
These two files are in the Data Files\Meshes\ directory, but only if you have added custom animations, otherwise they are extracted from the .bsa on the fly and this is NOT relevant. If they are in the meshes folder, then you can be pretty sure they've been altered and if you choose to edit them manually, you should back them up. One good test to see if these files are the problem is to rename them or move them out of the meshes folder and force the game to use the defaults. If the companions move properly, then you can be certain those files are the problem and need to be fixed one way or another.