Answer: A crack opened up in the floor of the cave and they fell through it.
Anxious to get away from the rock giants, the party did not check out the cave as thoroughly as they should have done. While most of them were sleeping, the sand in the middle of the cave started to pour out through a large crack in the floor, and the dwarves and Bilbo soon followed. Gandalf had disappeared earlier and was not with them. When they landed, they were surrounded by goblins who hustled them along. Bilbo crouched down and the tide of goblins and dwarves parted around him. Unnoticed, he was able to slip away, still free but separated from his party.