Question about laying on back

💁🏼⚜🙄
I have a boil on my leg and I've been instructed to keep it elevated as much as possible. It's pretty important to keep it up nearly all day. I've been laying down on my back with my feet elevated for probably 5-6 hours total today. Is it okay for me to lay on my back that long in the 3rd trimester? I'm 27w 3d does it make laying on my back better bc my legs are up?