Nausea

I take my pill regularly before I go to sleep, which is normally 10 or 11. But every so often I wake up nauseous and within a few minutes, I'm throwing up. Whyyy!!