I am going to take a western AND eastern approach to this question.
First of all, please don't feel embarrassed at all regarding masturbation. I won't go into the details of masturbation (unless I have to) but suffice to say it is a normal thing to do. You asked two very pertinent questions there which I hope to answer:
1. Is there something wrong with me??
No. There isn't anything wrong with you. If food is nutrition for the body, then sex is nutrition for the mind. The fact that you believe something is wrong with you is perhaps due to the brainwashing you had when you were a kid, probably brainwashed by the media, by your parents, your peers, or your religion. But every single western medical literature out there has managed to prove the significance of sex in the wellbeing of humans.
The only danger here is getting addicted to masturbation that can prove to be trouble. I hope you don't have an addictive personality? :)
2. How can I get over it?
First of all you have to know whats causing your insomnia. Sleep is very elusive. The more you want it, the more it doesn't come to you. I'm sure you had one of those nights when tossing and turning in bed not being able to sleep because you're so worried about not being able to get up in the morning for work. The more you force yourself to sleep, the more afraid you become, and the more agitated you get and thus insomnia.
A good sleep requires a calm mind. I personally prefer to meditate if I couldn't sleep. You can argue that perhaps its the pillow, or the bed, or the room thats making you feel uncomfortable... but as far as I know, as long as the mind is perturbed, nothing will be good enough for you. You can be sleeping in a presidential suite and you wouldn't be able to sleep.
Calm your mind down. Remember that there is nothing wrong with not being able to sleep. People worry too much about work in the