Okay so, my answer is going to be complicated.
Soft YTA, but not because you're asking him to text you every night. Truthfully, I dont think sending a goodnight text to your significant other when you cant see them physically is a crazy demand like some people are saying. It seems like a reasonable expectation to me, but I think when you love your partner you want to express that love, which means goodnight texts without being prompted.
HOWEVER, as a fellow mentally ill person, I'm going to say that posing this request as a way to relieve your anxiety is not good. Hinging your mental health on the actions of others is not going to help you and it only encourages the undesirable behavior (anxiety) to continue if someone doesn't happen to behave the way you want them to. Your need to have coping mechanisms that don't depend on the contributions of the people who love you. It's not their responsibility to maintain your stability, even if they're a significant other. If they love you, they're more than likely going to want ti help and ease any suffering you might be experiencing, but you still have to work on yourself and practice mindfulness in order to better yourself and make sure you're treating them like people instead of medicine. Even at their best, the people who love you can have days where they dont meet all your expectations and needs, and if you're heavily depending on them to prop you up, you're going to fall. I have BPD and that is an extremely difficult lesson to learn, especially when the solution to a panic attack is as simple as a text back. This behavior isn't healthy. You need to find coping mechanisms. Wishing you the best of luck, friend.