Pardon my first rude post,
In all honesty, it is rather rare for a betta to attack an apple snail, simply because the snail has a shell and they learn it's pointless.
Now depending where you live in the Uk, we've had a bit of a heatwave the last couple days and it's entirely possible the water was too hot the snail on the glass, so he had his shell open on the gravel, giving an attack opportunity.
How old was the snail? The average in tropical tanks is about 1 year, due to higher temps speeding up their metabolic rate and therefore life cycle. The snail could have been getting old and just simply died by itself with the shell open.
Did you actually see the bettas attack and kill? Or just find a dead snail?
Also, on regards to the heat, I've heard recently from a lot of stockists in my area, that during the warmer days, 30C +, their bettas are getting a lot more aggressive, if that's purely agitation from the heat or otherwise, I don't know, but there is definitely a positive correlation, at least in my area anyway.
Hope that gives you some more ideas.