Pressing on the nerve in your elbow, the ulnar nerve, could cause complications in your hands some time down the road. The most obvious way to prevent damage to the nerve is to stop leaning on your elbow. It may seem simplistic, but you would need to adapt your working environment to help you remember not to rest your elbow on your desk.
Perhaps you could have reminders pop up on your computer to check where your elbow is, you could ask coworkers to point out when you’re doing it or you could even put something on your desk where you would normally rest your elbow, so that you can’t do it.