Is it necessary to eject an external drive before sleeping?
It's neither necessary nor recommended (at least from what I've read).

When you put the Mac to sleep, it will try and also put the external drive to sleep, thus parking its heads and turning off the drives. It won't eject it, however, so you can use it as soon as you wake your Mac again without having to mount it.

The benefit is that you don't have to worry about mounting it, as in most cases this would involve turning the drive off and on again, reconnecting the plug, or using diskutil from a Terminal—quite time consuming. Since I use my drive for Time Machine, I don't want to have to think about connecting it every time I wake my Mac.

The only downside I see is that you could accidentally plug the drive out. In that case, the Mac will wake up, and show you the error about a drive being disconnected without properly ejecting it. Since all data is written to the drive before going to sleep, this shouldn't cause any data loss though.

All in all, it's much more comfortable to just keep the drive mounted.