Sorry you're having trouble sleeping. I know that's just making recovery harder. You probably already know this, but here's the thing: being stressed out about not sleeping can just keep you from sleeping. The first step in getting past that is just to release yourself mentally from the stress/insomnia cycle.
What I mean is that you have to acknowledge that you just had major surgery. Coupled with massive dietary changes and you are going through an incredibly stressful time right now. It's normal when stressed to struggle with sleep, so the best possible thing you can do is simply acknowledge that sleep may be difficult for a while and it's okay.
I would also say do whatever you need to do to get control of your pain levels. You may need to try changing out your pain meds, or consider changing where/how you sleep. As an example, even though I'm normally a stomach/side sleeper, I slept on my back in a recliner for the first couple of weeks simply because it was less painful.
Finally, I'd recommend researching good sleep hygiene and implementing as many of those recommendations as possible. Right now, you need all the tips and tricks you can get.
Good luck.