There is an exercise I devised for myself several years ago, and I should preface this with the information that apart from a Sophocles Papas classical guitar technique book I had, I am self-taught on the bass guitar. The technique in that book favors alternating finger work. I am currently getting classical instruction for double bass.
Anyway the exercise is to build some kind of three note pattern of quarter notes which can be anything as long as it has one string crossing in it and practice repeating that 3 note pattern as if it is really 3 bars of 4/4 time so that the one count keeps shifting through the notes. Adhere to strict finger alternating while you play the pattern. Play it real slow at first until it becomes a "feel". What happens is that your right hand is in good old comfy 4/4 in the double alternation while the left hand had to do some thinking. Essentially your hands will at first feel like they are playing in different time signatures. It's a bitchin' exercise with a lot of possible variations that I used to do as well, like 3 fingers with 4 note pattern, thumb and index instead of index and middle, thumb and third, etc.
I only play strict like that when I exercise. When I play, I just go with the vibe and flow. I don't have time to think about what the fingers are up to. If I exercise enough, it will be automatic and if it isn't always alternating, too bad......