It would be tough. In an F-16, the FDR is bolted to the frame of the aircraft by for four hex head fasteners.
The sub would have to have the ability to unscrew the fasteners with the properly sized driver.
And that assumes it is not resting on it or buried deep under silt.