If your dataset is well aligned, so that the nominal Left-to-Right axis is truly a good left-to-right direction, then 3dcalc could be used. Use AFNI to view the epi+orig dataset with the mask dataset M+orig as the overlay. Determine the x-coordinate that best separates the hemispheres (by placing the crosshairs at the inter-hemispheric fissure, then looking at the coordinates in the upper left corner of the AFNI controller). Suppose this value is x=3.5. Then the command below will create a mask from the Right hemisphere of M+orig:
3dcalc -a M+orig -dicom -expr 'ispositive(x-3.5)' -prefix Mright
Change 'ispositive' to 'isnegative' to get the Left hemisphere.
If the dataset is NOT well aligned, then you need to align it first. There are several ways to do that, depending on your ultimate goals. For example, you could transform a corresponding anatomical dataset to +acpc coordinates, then THAT dataset will be well aligned (by construction). Then create a mask in that coordinate system, then backtransform that mask to +orig coordinates using '3dfractionize -warp'.