The best thing you can do is to find a teacher, even if it's for just a few lessons. Please keep in mind that if you can't find a bass teacher, any musical instrument teacher knows you should not tense your hands when playing, even if they can't tell you if your technique is correct, they can check if your tensing up. Other musicians should also know that and be able to check it. Alternatively (if there are just no other musicians in your area), you could ask an ortopedist, physiotherapist, or occupational therapist to look at your playing (they might save your back while doing so as well).
If you want to do it on your own, first of all play slowly (even if you were able to go much faster before your hiatus). And check your hands (yes also your fretting hand even if it's not yet giving you trouble) for tension while doing simple exercises, where simple really means suitable for absolute beginners. Your hands and whole body need to get reacquainted to playing the instrument, also check on your back, neck, shoulders, etc. Check that there are no unneeded bends in your arms, and that your plucking arm is at least at first not resting on the instrument.
What can help when getting cramps is shaking your hands loose every so often.
Part of you can still play exactly the same stuff as you played before your hiatus, at exactly the same speed, and you can even now occasionally play that way for a few minutes, but most of your practice should at first be slow, focusing on relaxing, gradually speeding up. You can also add in more and more complex exercises, but again start by playing them really slow and totally relaxed, and only speed up once you have your hands not tensing up. This may all sound like your beginning from scratch, but you're not. You will be up to your old level of playing much faster than an absolute beginner.
Also keep in mind that all of this is just as much valid for any other musical instrument, not just electric bass guitar.