Hi Majic,
During surgery they pump your body with fluids via IV and this may be a contributing factor for days to early weeks after surgery.
Try to limit fluids before for a couple hours before bed, if you're not already. Stay comfortably active during the day to aid in circulation and avoid fluid build up. Make sure you're elevating too, Majic.
It is our lymph system that rids the body of fluid (swelling). So you want to get the fluid to the lymph nodes in your torso area so your body can more quickly process it. The lymph system works rather slowly on its own and much more efficiently with the assistance of gravity. The fluid isn’t draining into the hips, but contained with the lymph system and moving to the torso and lymph nodes located there.
You will not die from lack of sleep as it's only temporary.

Sleep anytime you're able, day or night.
Pillows can help, making it easier to fall asleep. You can experiment with different arrangements to find what works for you. I surrounded myself with them so I could rest a leg, or arm easily enough, whatever felt comfortable. Make up the bed with your most comfortable bedding / blankets along with a few extra bed pillows of different degrees of firmness. Try to block out the light if it's daytime. Minimize noise unless you feel listening to calming relaxation music, a fan, or white noise may help lull you to sleep. Make sure the room temperature is not too hot or too cold. Try to disconnect from the devices at least an hour before the targeted nap or bed time, so it's easier to wind down. Limit caffeine throughout the day and consider natural sleep aids such as Valerian, Chamomile or, Magnesium, my personal favorite, which can assist in muscle relaxation and nerves and promote healthy sleep (falling asleep and staying asleep)
Apply ice for a time before bed to reduce swelling and numb any discomfort. Try some relaxation techniques if you feel they may work for you such as deep breathing, prayer or meditation or even some gentle stretching may help relax your body and mind.
An article on Magnesium from our Library -
https://bonesmart.org/forum/threads/magnesium-is-a-star.20301/
Most large grocers carry a variety of teas such as Celestial Seasonings - Sleepytime Herb Tea,
Yogi Teas, Bedtime, Bigelow Cozy Chamomile, all of which may help you relax...at least worth a try.
Time will also help, but that takes patience, especially when you're restless and tossing and turning all night.
Wishing you many nights of peaceful sleep soon!