I take magnesium, which is effective for eye twitching and insomnia.
I make sure to take it before going to bed.