Speaking as a nurse who's had a lifetime in joint replacement surgery and now does joint replacement counselling, it all depends upon the surgeons! Some like the restrictions, others don't. Those that apply them usually cite between 6 and 12 weeks before those movements can be used generally. The risk, of course, is dislocation.
The risk is on a sliding scale meaning the first week or two it's high then gradually reduces as the time since surgery grows. The key is the healing of the muscles and recovery of tone, of course.
Short story long, first ascertain what instructions the patient's surgeon has given them. Once that period is over, they should be able to return to normal activities amost immedately or as soon as they feel able. For patients who have had no restrictions, they can do it sooner, as they feel able.
Hope this helps some. It's rather one of those 'how long is a piece of string' questions!