A hot tub raises your core body temperature and when you get out of the hot tub your core body temperature then begins to drop which causes the sleepiness.
Just like when it's time for bed our core body temperature normally drops which signals our bodies that it's time for sleep.
Sometimes heat on our body can make us sleepy as well as when our bodies temperature rises then we become sleepy as a result as well.
Just like when I turn my heater on in my car I tend to get a bit sleepy so I have to keep the heater down in the car until I'm fully awake.
Our bodies are different and I too get sleepy when I'm in a hot tub longer than 30 minutes since my body temperature rises.
Some people never get sleepy in a hot tub however some people do because of the temperature rising and then cooling down.
If you're starting to feel sleepy when in the hot tub it's best to get out of the hot tub and take a break to prevent potentially drowning in the hot tub after being asleep.