sed is not able to eat newlines in a simple way.
sed works on a line-by-line basis, so it can only add newlines, not remove them. But you can effectively do some sed gymnastics by storing two consecutive lines. You may also want to have a look at
tr, which is able to replace characters, for example:
tr '\n' , < file
Also, with many tools you can use
'\n' to represent the line feed character (used for UNIX line breaks).
Like Stephane pointed,
tr will replace all the line feeds (including the last one). You may prefer to use
paste, which will join the lines using a specified delimitier:
paste -sd, file