In my first manic episodes, things didn't really get out of hand until I had gone without sleep for a few days. I had convinced myself that as long as I got rest, sleep was not necessary. I have since learned that sleep is the brain's reset mechanism. It's not just for the body, it's essential for the mind.
A healthy amount of sleep is around 7.5 hours/day. If you're falling substantially short of that, see your doctor or go to the store and get some diphenhydramine. Ideally, you want to learn to sleep on your own whenever possible, but don't dwell on that. Get your sleep however you can.
When you're in depressive mode, you may have the opposite problem. You want to sleep all the time. This is a reaction to your emotions and the best way to combat that is to simply ignore the urge. If you know you've had enough sleep, get up and find something to do. Take a walk, clean the house, read something.
In manic mode, your thoughts can often keep you awake. You have an idea or train of thought that's stuck in a loop and you can't let it go. One thing that helps is to make use of external memory, that is, write it down. You can go to your computer or pick up a pen and paper and just write yourself an article, essay or letter. The idea will be there in its entirety should you decide to pick it up again tomorrow or later. If you're re-thinking all the things you need to do tomorrow, make your to-do list and set it on the kitchen table. Get all the things rolling over in your head onto hard copy. You'll find it quite relieving.
Alcohol is not a good solution. Trust me on that one. Turkey soup, however, does help. Another trick is to count backwards in your head, slowly, from 1000. If you lose count, start over. If you get to zero, start over. It's tedious and boring and keeps your brain occupied. Eventually your thoughts drift and you'll find yourself nodding off. Also, if you're consistently not getting enough sleep, layoff the caffeine for a while. You don't have to give it up forever. You can live without it for a week or two.
The need for sleep is a biological fact. It's important to acknowledge that because your brain will sometimes try to convince you otherwise. The world will still be there when you wake up. It's okay to ignore it for a few hours. In fact, you'll deal with it much more efficiently if you do.