I have seen one interview of a former gambler and what he is saying caught my attention. He says that "when you're winning you can't sleep". I'm not sure if others have experience it or if this make sense. In any case though, one explanation is that we are really in a heightened alert, meaning it's like gambling is like a drugs that keeps up alive and awake and then the human emotions of greed takes in as we want to win for. But the problem is that after that, and in worse case if our luck turns bad, then this drug will like shoot to 100->0 in a instant. Or like when we are about to go to bed and suddenly that inch comes along and let's say that we go on sports bet, but the game will start in the next couple of hours, then we might have difficulty in sleeping and as if we take like 4 cups of coffee or a energy drink because we will for sure can't wait to see that game and hope that our stakes is going to win.
What you're experiencing is
dopamine rush. This also happens to me when I'm gambling at night and I'm having win streaks. After I quit after being wise with my winnings, it's difficult to go sleep properly because there is a strong urge in the back of your mind to gamble more.
My solution to this is I avoid to gamble exactly before I sleep. After I play, I distract my mind to to forget the excitement by doing other activities such as watching an episode of tv series or scroll on social media. After that only I will go to bed.
Source: Google search
Gambling triggers a dopamine rush in the brain, a neurotransmitter associated with pleasure and reward. This release is particularly strong during the anticipation of a win, even if the bet is ultimately lost. This surge of dopamine reinforces the behavior, leading some individuals to develop a compulsive need to gamble.