Xanax is not specifically for sleep, it's for anxiety. If insomnia is related to anxiety, it will help. If it's related to some other issue, it might not do as well. There are other medications that are specifically designed for insomnia. Talk to your doctor.
The only suggestion I could make, is that along with what you didn't like, you could make a suggestion of what you would like. Something like, "That makes me nuts. I'd rather lay there with you if we could do this instead:"
For me, I'd rather have my IPod and headphones so I could listen...