sed is printing the file with the substitution you told it to make.
I think a better idea might be the following:
#!/bin/bash
IDS=$(curl -v --silent "http://example.com" 2>&1 | grep -Eo 'data-user_id="[0-9]+"' | grep -Eo "[0-9]+")
echo "$IDS" | sedtr 's/' /\n/g'' '\n' >> "ids"
This will echo $IDS and apply the space to new line substitutiontranslation before appending to the file.