In the beginning you may only want to wear the prosthetic leg for around 2 hours maximum until you get used to it.
You should remove the prosthetic leg after 2 hours and examine your leg and make sure it's okay.
Then after you get used to wearing the prosthetic leg you might be able to wear the prosthetic leg longer but if possible it's best to remove the prosthetic leg after 3 hours max.
Whenever you sit down or are sleeping it's best to remove the prosthetic leg to allow your amputated leg part to have a break from it.
Also sleeping with the prosthetic leg is likely not comfortable anyway.
If you've never wore a prosthetic leg before wearing the prosthetic leg at first can hurt.
It can take awhile to get used to wearing the prosthetic leg in the beginning so it's normal for it to hurt at first for awhile until you get used to wearing and walking with the prosthetic leg.
The actual time it takes for you to get used to wearing and walking on the prosthetic leg can vary but some people take between 2 to 6 months and as long as a year to fully get used to wearing and walking on the prosthetic leg.
You usually won't be wearing a prosthetic leg for at least a month or so after the amputation because your leg needs to heal from the surgery.
But people do eventually get used to wearing the prosthetic leg and you take it off when you don't need to wear it.