Sarah-
I have experienced twitching throughout my TBI experience. In the beginning, I didn't even know I was doing it. My boyfriend and I share a queen sized bed. In the morning he would ask my why I kept twitching all night. I didn't even know I was doing it. However, it was really bothersome for him, so when we went to my next concussion appt. I asked my doctor with him there.
The doctor said that this was likely due to an exaggerated "startle response". Post head injury, your central nervous system is in a heightened state a lot of the time. Therefore you startle easy and may twitch. Anytime something would unexpectedly come into my range of vision or something would touch me, I'd twitch and gasp loudly. (I still do this. It's somewhat embarrassing as I've had neighbors and complete strangers repeatedly apologize all over themselves for "scaring" me) :-/
That being said, I started to notice it when I'm really tired and sitting still. For example, if I'm really wore out and sitting on my couch, my leg will twitch randomly, an arm, my hamstring, etc. It's normally a good indicator for me to go to bed.
Are the headaches related to fatigue? If so, could it be that the twitching is due to your nervous system being fatigued and on alert? (I haven't found a relation between headache and twitching, but I'm sure it's very possible as both are a part of the nervous system
That being said, some medications can cause twitching responses. Have you recently started or increased a dosage of an SSRI? If so, this could be a side effect and you would want to check with your doctor at your next appointment.