RAW, there is no way to achieve resistance to sleep, because sleep is not a damaging effect.
Other answers have suggested:
Having the character not be able to be put to sleep (although this is not resistance, but rather immunity)
Having advantage on saves against sleep (although this is not resistance, but rather advantage, requires the invention of a sleep save, and begs the question of whether a successful save uses some of the spell's hp pool or not- see below)
Increasing the hp of the target for the effects of sleep
This last possibility is the closest to how the resistance mechanic works. However, the answers that suggest this have not (yet) acknowledged that hp actually affect the sleep spell in two different ways. First, the sleep spell targets individuals in ascending order of current (non-zero) hp. Second, the hp of a sleeper "use up" the spell's pool before the sleep effect passes on to the next target. Thus, advocating for a hp increase mechanism should include specifying which of these two processes are affected.
If the hp increase affects both the targeting and the pool-drain steps, the race will be less likely to be affected by a given sleep spell, but when it is affected, it will also protect those around it, even not of its race, by using up more of the hp pool available to affect the next target. This might be indicated if the OP's conception is that it "costs more" to affect this race with sleep, but it might appear unfair to the caster as it renders their spell less powerful when they have one of the resistant race as a target - in effect, the race produces a "sleep dampening" aura that benefits those around it.
If the hp increase affects only the targeting step, this would allow the race to avoid many sleep affects, but when it was affected, it would not then drain double the hp remaining out of the spell pool and thereby protect those around it. This would be indicated if the OP's conception is that the race is more difficult to affect by magic, but doesn't somehow use up the magic and thereby protect others.
If the hp increase affects only the pool drain step, this would mean that individuals of the race are as susceptible to sleep as anyone else, but when they are put to sleep they use up more of the spell (which does not seem to be the OP's intent)
While this hp doubling, when properly specified, is a workable solution, it does have the limitation that its strength is inversely correlated with the individual's need for its protection. Consider two individuals, one with this 'resistance' (affecting targeting at least) and one without. When both individuals are at full hp, the 'doubling' effect is going to be extremely powerful for the one with 'resistance' - but when both are at full hp they are unlikely to be the targets of a sleep spell to begin with. The more they are wounded, the more they will come into the range of being possible targets for the spell and thus need the protection of resistance. This formulation would certainly delay the susceptibility of the resistant individual to sleep as planned, protecting it at the first point when non-resistant individuals of equal hp around it were being affected. However, the more wounded it becomes the less protection the 'resistance' would actually give. As the extreme example, when both are down to one hp, the value of the 'resistance' will be at its minimum of just one hp, and unlikely to make a difference in whether or not the spell affects the 'resistant' race.
Contrast this with the effect of resistance to damage - there, the damage taken is reduced irrespective of the current hp of the character. The strength of the resistance does not diminish as the need for it increases.
I propose a different mechanic:
For the purposes of spells that target based on hit points, individuals of this race use their hit point maximum rather than their current hit points
This would allow one of the race to be in a crowd and most likely unaffected by a sleep spell, but still be possible to be put to sleep by a caster who could define the area of effect to include only them and/or who upcast the spell to the maximum slot possible. Thus they would be resistant, but not immune. Furthermore, by using the hit point maximum, the resistance would be at its most powerful when the individual was most wounded, in contrast to the hp doubling method.
If this ability is considered too strong as written, it could easily be modified to some variation on
For the purposes of spells that target based on hit points, individuals of this race never use less than half their hit point maximum
Note that while I have focused on the sleep spell in this answer, the OP asked about any spell that targets hp, such as color spray. My argument is consistent with any such effect.