With the default file system JHFS+ or Mac OS Extended (journaled), recent versions of Mac OS X defragment some things automatically. However, if you use large files or have a very full disk you may benefit from defragmenting.
If large amounts of contiguous space are occupied by multiple swapfiles at
/private/var/vm then restarting the System can temporarily free the space used by all but one of those files, and so possibly allow other types of file to be written — without fragmentation — in that space.
See "About disk optimization with Mac OS X"
iDefrag is one product listed in Apple database that also states it doesn't touch the "Hot Zone" which is an area of the disk used by OS X to optimize disk access. They have a demo version you could try.