Question: I move my laptop computer on the bed, and between the bed and the desk often, with some USB devices plugged in. I ended up breaking many USB cables by rotating them many times.

So, as a countermeasure, I began to buy long, flat cables that is difficult to break this way, and prefer Bluetooth versions if available. But not every device comes with a replaceable cable. Is there an easy way to rotate them back, or prevent them being rotated in the first place? Note that they tend to "remember" their shape to some degree if not moved for long enough.

Edit: I don't really care much about the lifespan of such devices, as they are usually small and cheap (that doesn't even have a replaceable cable). But there is much hassle to replace them. I don't want a way to deal with this situation that takes much more time accumulated...

Answer: 
Move everything to its new position. Unplug one end of one USB cable. Gently pinch the other end of the flat cable between two of your fingers. Slide your fingers to the far end of the cable to keep it flat and untwisted. Then plug it back in. Repeat this for each cable.

I don't know how much wear-and-tear this will cause your USB inputs. Hopefully, if you unplug and replug them slowly, they will last for years and years.
Once you break the shielding surrounding all the wires it's very difficult to repair. It breaks well before the wires generally. Just try to untwist gently, daily and they'll last a little longer