Cancellling Out the Effect of Constant Gravitational Acceleration in a Datalogger
Depending if you process logged data or real-time data the method  vary. What you need is presume that object is not constantly accelerating, which can be proved by the fact that animal stays on Earth.
You can use a moving average filter to subtract the mean value (gravitational bias) from each sample. You do this in Matlab by using filtfilt() which properly matches the initial and final state based on the data values. For filter you can design a simple averaging FIR filter with equal taps or some more suitable FIR filter. A good reason to use a filtfilt() is that it filters forth and back thus the filter delay is canccelled, all signals remain in exact phase.  You do the same with gyro, then fuse both data together.