Why is spicy food less spicy when it's allowed to cool?
Capsaicin, the chemical that makes peppers spicy, activates a sensory receptor which can also be activated by heat. (https://en.wikipedia.org/wiki/Capsaicin#Mechanism_of_action)

That means that when a food is spicy and hot, you feel both types of heat using the same sense! When the food has cooled and you're not feeling the heat (temperature) any more, it no longer adds to the feeling of spicyness.