You should put a new line immediately after \ :
sed '3i\ text to insert' file
This is actually the behavior defined in the POSIX specification. The fact that GNU sed allows you to specify text to be inserted on one line is an extension.
If for any reason you need to use double quotes around the sed command, you must escape the backslash at the end of the first line:
sed "3i\\ text to insert" file
This is because the shell first processes the string in double quotation marks, and \ is deleted, followed by a newline character:
$ echo "abc\ def" abcdef
source share