Based on the information you provided and the extract below from AR 350-1 Appendix G-9. You should be given 3 months upon returning from a deployed environment to prepare for a FOR RECORD APFT, you can be given diagnostic APFTs as often as the commander desires. The regulation does not specify how long you must be deployed in order to be granted the 3 month deferment.
Physical readiness testing gives Soldiers an incentive to stay in good physical condition and allows commanders a means of assessing the physical readiness levels of their units. Accordingly, all AA and RC Soldiers must be able to pass the APFT at any time, except upon return from deployment. Following deployments, Soldiers will be administered a record APFT no earlier than three months for AA and 6 months for RC Soldiers
The best bet is to always discuss issues like this with your chain of command.
Hope this Helps