I used to have this, on and off for a couple of years. I would wake up and my hands would be straight, stiff and with a deep internal ache (sometimes quite mild), particularly across the knuckles at the base of the fingers. They ached worse in the cold.
It all disappeared when I gave up wheat and lowered my carbs drastically. I was never tested, but suspect it was diet triggered rheumatoid arthritis.
15 years later it has never come back.
Patrick Holford has written a book about it called Say No To Arthritis - might be worth a look.