Contrary to popular belief, astronauts still have weight while they are orbiting the earth. In fact, Shuttle astronauts weigh almost as much in space as they do on the earth's surface. But these astronauts are in free fall, together with their ship, and their downward accelerations prevents them from measuring their weights directly.
Instead, astronauts make a different type of measurement—one that accurately determines how much of them there is: they measure their masses. Your weight is the force that the earth's gravity exerts on you; your mass is the measure of your inertia, how hard it is to make you accelerate. For deep and interesting reasons, weight and mass are proportional to one another at a given location, so measuring one quantity allows you to determine the other. Instead of weighing themselves, astronauts measure their masses.
They make these mass measurements with the help of a shaking device. They strap themselves onto a machine that gently jiggles them back and forth to see how much inertia they have. By measuring how much force it takes to cause a particular acceleration, the machine is able to compute the mass of its occupant.
Answered by Lou A. Bloomfield of the University of Virginia