On April 12, 1985, NASA decided to test just that.
It sent a yo-yo into space with the astronauts aboard the space shuttle Discovery.
What they learned was that a yo-yo would indeed work with little-to-no gravity.
With a gentle push, it glided down the string and back up again. Simply dropping the yo-yo, though, didn’t work; it had to be thrown. Furthermore, they learned that without gravity, a yo-yo could not in fact “sleep.”