thanks for posting,
From your description it is very possible that you might be suffering from nothing as just the act of bending stretches your hand muscles and tendons further, hence this can generate pain. In the other hand, this could be as a result of mild tendinitis
which when stretching or bending is done, it results to pain. You will need to consult a rheumatologist
or an orthopedic surgeon to take a closer look.
Another possibility is neuralgia
located exactly on the top of your hand.
Your problem might not necessitate any medication but physical therapy
could bring you some further benefits.
Hope this helps