You say "I could use ___" to indicate that you really want or need something, like a drink, but for some reason you haven't been able to get it yet. In the example at top, you say "I could really use a cup of coffee" because you're very sleepy and need some coffee, but there's no coffee nearby.
Here's another example - when you're struggling with something, and there's someone nearby who isn't helping you, you can say:
I could use a little help.
A similar phrase is "I could go for ___." Only use this to talk about things that you suddenly want, like food or drinks:
I could go for a beer right now. You want one?