The American Heartworm Society does state that exercise restriction should begin the same day the diagnosis is confirmed.
Your heartworm positive dog, after receiving melarsomine treatment will be instructed to remain caged, crated or penned for the duration of this phase of treatment except when they need to go outside to potty. The duration of this phase may be as short as 30 days, or as long as 120 days, but most of my foster dogs were under cage rest for 60 days.
During exercise restriction:
During cage rest for non-symptomatic dogs:
The information shared here is not a replacement for the advice and direction of your veterinarian. Every heartworm-positive dog is different, and may require a very specific protocol.