Adding nutrient at any time is O.K. as long as you don't over-do it and have too much unused nutrient as suggested above. There are some opinions that if nutrient is needed it is best added after primary fermentation so there isn't a "rush" of nutrient that leads to fermentation taking off too quickly. "Low (temperature) and slow (fermentation) is the way to go".
Firstly, some basics, then how to do it. The basics are that yeast need YAN (Yeast Assimilable Nitrogen) for fermentation and most apples inherently have enough YAN for the yeast to complete fermentation. However, there are exceptions. Some apples are simply low in YAN (because of their type, or they are late maturing, from old unfertilised trees, or "shop" juice stored for too long, etc.) So, fermentation can stall from lack of nutrient, especially if the yeast is a high nutrient dependent type, as is the case with some ale yeasts.
DAP is 20% nitrogen ("YAN") and as mentioned in an earlier post, studies have shown that about 50ppm of DAP (plus ideally a small amount of thiamine, which should already be in the juice) is needed to ferment SG 0.010. So, to add nutrient (DAP) late in the fermentation you need to calculate just how much DAP is needed for the remaining fermentation to avoid adding too much.
You can see from this that a teaspoon of DAP per gallon is "overkill". You mention 1t per gallon which I read as 1 teaspoon... is that what you meant? Most of the DAP available here suggests something like a gram (1/5 teaspoon) per gallon. I did find some LD Carlson DAP on Amazon, and the pack recommends 1/2 to 3/4 grams per gallon.
The how to do it involves micro-dosing with nutrient if the fermentation stalls. In your case, the fermentation seems to be progressing O.K. albeit a bit slow. You have gone from 1.065 to 1.040 in two weeks which is not unusual. You could reasonably expect to be down to your target of below 1.010 in a few more weeks. Keep checking progress and only worry about adding nutrient (DAP) if fermentation stalls.
Just as an example, let us assume that your cider stalls due to nutrient deficiency at 1.015 (a typical stall figure by the way). You will then need to micro-dose with nutrients to progress to and stop at say 1.005. At the accepted rate of 50ppm of DAP for a 10 gravity point drop, you would need 50 ppm or 0.2 gram in your 5 gallons of cider. This could best be described as "a bit of a sprinkle"... and such a small quantity is quite hard to measure accurately.
One way to deal with the measuring difficulty is to mix 2 grams (a bit less than 1/2 teaspoon) of DAP into 100 ml of water, juice or cider which makes a solution of 0.02g of DAP per ml. Then put 10 ml of this solution (which is 0.2g of DAP) into your gallon of cider. Clearly micro dosing is much easier with large volumes of cider, but if you aren't too worried about precisely determining where fermentation will stop again, this should work O.K.
I must say that if I have to restart a stalled fermentation I just add a pinch of DAP which then restarts fermentation down to 1.000 (not terribly scientific or precise, but it works). I then increase SG with sugar or juice to a target figure for sweetness and carbonation and bottle. Hot-water pasteurising at the right time, results in stable semi-sweet carbonated cider.
I hope this helps.