Its a pretty stong reaction you got from taking 40 mg Zolpidem but its not unheard of at all.
If you look around this site and google, you will find that some people are able to experience some crazy stuff on this drug while others dont respond much to it at all.
I have taken Zolpidem lots of times for sleep in dosages ranging from 2,5 mg-10 mg.
On 10 mg I often find my self with a changed perception of the outer world and some mild visuals with change in color and none-organic stuff starting to "breathe".
It resembles the effects of a low dose psychedelic a lot to me.
On one occasion I decided to try a larger dose and to take it nasally instead of orally as I always do.
I decided to take 10 mg up the nose with the intention of redosing with 10 mg if needed. I ended up taking 30 mg up the nose that night and found compulsive redosing to be a major downside to this drug.
I didnt get quite as fucked up as it sounds like you did but I was pretty far away for sure.
Felt a lot like a cross between psycilobin mushrooms and Ketamine.
I got heavy visuals, both closed and open eyed ones, everything started to feel alive in some way with the breathing and stuff but the most crazy part was that I got these blackouts for just a couple of mins at a time there I just found my self standing with closed eyes, sinking into my mind and the next sec I would "wake up" and try to remember wtf I went into that room for to begin with.
I also got this very cool and calming feeling that I wasnt alone even though I knew that I was in fact alone in my apartment the whole time.
I have never experienced a feeling like that on anything before, it was like having a make-believe friend come to life through the power of my own mind - very trippy and that was the thing that made this trip worth it in the end.
I dont plan on doing it ever again in these doses as I need a low tolerance for insomnia relief but I might some time in the future if I get rid of my sleeping problems.
I would advice anyone wanting to try these high doses of Zolpidem to take some precautions prior to ingesting.
Stuff like this would be worth considering IMO:
Have a tripsitter (sober or close to it) to watch after you as one can get very impulsive on this drug and consequenses of ones actions is not something that you would have in mind during the trip (I know I wouldnt)
Make sure you only have whatever dose you want to take on hand and nothing more. I wanted to take 10-20 mg, ended up with 30 mg - and Iv seen a lot worse around the net with this drug!
Dont mix with other GABAergics. Zolpidem is plenty stong on its own if you are one of the lucky ones who can trip on this stuff and other GABAergics would most likely take away some of the trippyness.
I do realise that this is a somewhat long OT ramble on my part but I thought you and others reading this thread might be interested in my experience with this drug.