You've taken the first step in doing so - acknowledging that you're doing it.
Now, where do you go from there? That largely depends on the situation, but here's a few things that might help to get you started.
Learn to roll.
You've been put in an arm bar, or you've been thrown, or basically any other situation that if it follows through to its natural end, you'll either end up with broken bones/joints (or you tap out or whatever in a competition scenario), or you're on the ground. Guess what? Most of those moves, you can roll out of them if you know how. Rolling is actually a counter to a lot of holds, locks, and bars.
So, this does two things for you - gets you out of the hairy position you've gotten yourself into, and (hopefully) gets you back on your feet. Even if it doesn't get you back on your feet (yet), it gets you off your stomach.
Learn how to get off the ground.
This sounds obvious, but it can be harder than you think. This isn't just about standing back up, it's about getting up as quick and efficiently as humanly possible, hopefully before your opponent gets you pinned.
Learn to get out of a pin.
The details of this depend largely on the nature of typical pins in Judo. I'm not familiar with Judo, but I am with BJJ and "street" fights. In many cases in those environments, at least at one point or another, you're pinned because you're opponent is sitting on top of you, somewhere on your torso. Start with that, and learn how to get out of it, regardless of whether you get off the ground or not.
From there, advance into more advanced pins, including the ones you'd face in a Judo match. Don't forget, too, your escape methods that you might use while standing. The details might be different, but there's actually a lot of crossover between standing and ground techniques.
Learn how to reverse a pin without standing back up.
This is a powerful thing to know. It's pretty self-explanatory, and the details will depend on what's legal in a given environment.
Practice more ground fighting.
In the end, though, you're not going to be able to get better at ground fighting, even enough to get off the ground, unless you practice it more. See if your Judo class/teammates will do some groundwork-specific sparring. Same rules apply, except you have to start and stay on the ground. This forces you to do more ground fighting, and forces you to use tactics you wouldn't normally use.