How can physical medicine help with a stroke?

Many benefits. Physical medicine (a medical specialty known as physiatry) can provide stroke rehabilitation by strength training, core strengthening, gait training, coordination training, assisting with activities of daily living (adl's) etc. All of these are to assist in improving or maintaining independence.
Function. The goal of physical medicine and rehabilitation after a stroke is to reduce post-stroke complications and restore as much function as possible. A good plan will evaluate overall mobility, walking, activities of daily living, communication, and swallowing function. A good physical medicine and rehab specialist (physiatrist) will work with therapists and other specialist to design the best plan.
After the fact. Physical medicine, a discipline known as physiatry, is probably the go to specialty in stroke rehabilitation, once all neurologic investigations for stroke initiation have been completed and dealt with. Btw the investigations and rehab can be done concomitantly.