I have an '22 Deluxe RI with a mahogany neck.
Is there any science to a maple sustaining better?
Sounding better is subjective and could be attributed to many factors.
Just curious.
no, there isn't any science to it.
We all seem to experience different guitars in different ways and make illogical assumptions
about why. Tone wood is one of those myths that won't die, except for acoustics.
On an acoustic guitar, the kinds of wood will make a real difference, but not on an electric.
Wood is not like, magnetic.
So IMHO most of the differences in electric guitar tone would be due to the amp! ...and its controls...
...and then age of the strings, the string gauge, the bridge, the nut, the guitar pick (or no pick)
the windings of the pickups, the "coupling" of the bridge screws into the studs in the body (or no studs)
the values of the pots and caps, how much wire the signal travels through before the amp...
...oh yeah and the placement of the pickups under the strings, the height of the pole pieces,
the angle of the pickups as adjusted by their screws...
IMHO there are lots of factors that affect tone and sustain, but wood isn't one of them.
Or at least
its effect is subtle compared to other factors I've listed above.
Just my opinion from a lifetime of guitar playing.
I'll tell you that my '66 Fender Jazz bass was the instrument that sustained the longest
in my whole collection. It sustained so long that often the last note of a song would still be
audible after the applause finally died down. And I never used much f/x with that bass.
Fender Maple necks give awesome sustain. My Telecaster is another example.
Anyone that says maple is dead sounding just doesn't know what he's talking about.
or he needs to change his strings.
But I own guitars with both mahogany and maple necks, and they all sustain very well.
That's why I feel the way I do. I don't fuss about the wood very much. I change my strings
often... dead strings don't have much of any sustain.
One of the coolest cheap guitars I ever played was my step daughter's Epiphone
Les Paul Special ll... It sounded pretty good stock, with plenty of sustain.
But its tone really took off after I installed the Gibson 490 R and 490T out of my
'07 SG special, and I also installed a tusq nut, a Tone Pros bridge and tail, and
a set of Grover Rotomatic tuners. Oh yeah, and a decent (but not expensive)
wiring harness kit from Stew Mac. Alpha pots I think. 500k
Switchcraft Jack and toggle...

The tone from that Epi is awesome, and it has nothing to do with the wood.
The guitar's original price new was maybe $160 in 2009.
The body is Chinese plywood of some cheap kind, and the bolt on neck is made of
what ever. It doesn't seem to matter much IMHO.