How old is it? Also maybe he is sad about something. Did you get any new fish that might be scaring him? Maybe he has a disease that you cant see like in the intestines or something. I hope he pulls through and plz keep us posted.
My PG did that too. It was a female and she was fine in the tank for some time. Then just stopped eating so much and died shortly after. I found PG's to actually be a really hard fish to keep. I tried it 4 times. 1 jumped, 1 got caught in a filter intake and 2 died for god knows what reason.
Join the party, Brad. I've gone through 8 of them.
2 killed by my dad's betta before I realized what was happening.
1 did fine for a long time, then stopped eating and died.
Bought 5 more, and they were ravaged by a parasitic infection. Knocked it back once, but it came back and killed them all.