A lot of my skinny cactus seems to like it growing across the ground rather than straight up. So it may not go back up if it likes it where it is. I have to prop up and tie many of my plants until they stay that way. Unless I have it in a hanging basket, I want all my plants to grow straight up. Like a tree or bush. Also keep partial shaded until it recovers from it's shock. Try spraying the stems rather than soak the soil.
Not a fan of this Euphorbia but I love most of the others. So I can't be sure. Just a guess.
Stush