Astronauts can swallow food in space because
The swallowing process forces food into the stomach
The process of swallowing food and its further passage through the digestive tract is due to a process called peristalsis. Peristalsis is alternate contraction and relaxation of the digestive tube creating a wave-like movement. Such a movement is caused due to the presence of muscles in the wall of the tube. Hence even if the astronauts are travelling in the space, the peristalsis is carried out as it is not under control of gravity.