I’m sorry you’re feeling so hopeless.
Is it a combination of pain upon weight bearing, muscle spasms and lack of sleep that you're dealing with?
If there is still pain upon weight bearing, I’m wondering what your surgeon concluded?
I would touch base with him, or his care team on that for advice. You‘re awfully early into the healing process and at a point where many are still dealing with pain, discomfort, sleeplessness and even a bit of post op blues.
Unfortunately, sleep proves elusive for many early on, so you’re in good company. Cold comfort, I know, but our body's energy supply isn't limitless. So when we're in healing mode after major surgery our energy will be used for healing first, not leaving a great reserve for all the other activity of daily life. It is completely normal to feel tired for quite some time. How long....most likely relates to your body's rate of healing.
I‘m sure dealing with muscle spasms only makes it more difficult. Make sure you’re staying adequately hydrated. Hopefully the prescription kicks in, but you may also want to consider more natural options if the spasms and sleeplessness lingers.
Magnesium supports the following:
Bone health
Healthy blood sugar
Cardiovascular health
Muscle relaxation and nerves
Promotes healthy sleep (falling asleep and staying asleep)
An article on Magnesium -
https://bonesmart.org/forum/threads/magnesium-is-a-star.20301/
Regarding spasms, I've also heard drinking 4-6 oz of Q-Tonic before bed can bring relief. It is a water that contains quinine. Read the label as some of the waters do not contain quinine, but quinine flavoring instead.
Wishing you comfort and relief.