You can upgrade your DL ticket to a AP on any day, as long as your ticket is still valid. My friends had a 5-day PH ticket and waited until the 5th day (mid-afternoon) to upgrade and there weren't any issues. If you do wait until the last day to upgrade, just make sure you upgrade before guest services closes that day.
In terms of when to upgrade the PH ticket, it depends on which type of ticket you have. If you have a 3-day of longer pre-purchase ticket, you'll be eligible for one Magic Morning. If you upgrade, you lose that perk, so be sure to use the Magic Morning before upgrading. Other than that, I would generally opt to upgrade as soon as possible because the shopping and dining discounts are pretty good at DLR.
On the flip side, WDW's dining and shopping discounts aren't as good (usually 10% for shopping regardless of which type of AP) and very few dining discounts. On the other than, the on-site hotel discounts for AP holders at WDW can be pretty substantial and often make it worth it to have at least one AP in the group.