matia made me want to elaborate a bit
i agree that sustain is pointless in chasing using wood types, i believe its something to look for when buying a guitar as it shows that things are correctly adjusted and the neck is firmly fixed as well as the bridge being well attached and high quality.
things that i didnt mention, and mattia didnt completely go into is the way some woods dampen some vibrations due to the oiliness of the wood. think a cardboard guitar. theres a big difference in its sustain when its wet compared to dry. thats what oils in wood do, but not quite so severe. it would effect the harmonics more so than the fundamental note, but still effecting the fundamental to a small extent. also consider that a wet cardboard guitar/oily wood guitar will be heavier than a dry cardboard/oilfree wood guitar.
id say that the stiffness of the wood effects the fundamental note's sustain, where the internal resonance and dampening effects the harmonics alot.
i dont think weight has a big part of sustain, but people always say that ebony doesnt sustain well, and it has more of a percussive sound. id say this is a result of too much stiffness and too little internal dampening, making it resist the strings vibrations by not vibrating itself. keep in mind that too much isnt nessisarily a bad thing, just a different result.
basically ive described what creates different wood tones. warm sounding woods basically have a higher internal dampening to stiffness ratio.
speaking of les pauls, they have a maple top, increasing the stiffness and reducing the internal dampening of that section of the stucture (maple is stiff and bright sounding, suggesting low internal dampening). they have mahogany necks, which isnt particularly stiff, but les pauls have fairly thick necks, and the mahogany is quarter sawn increasing the stiffness. being mahogany, it has a higher internal dampening than maple, so it is not so bright, but has a fairly stiff neck, allowing the fundamental frequency to resonate for a while, which supports the idea that a les paul has alot of sustain, and is quite warm sounding.
the electronics have alot to do with the tone coming through, and even the magnets on single coils effect the sustain by pulling at the strings more than humbuckers (the pull from alnico poles is stronger than the pull of slugs/poles magnetised by a alnico or ceramic magnet.
i think i got well and truly off topic here, but atleast it has preoccupied me with something other than an uni assignment i left too late.