Yes, you need it as you have transit more than 19 hours
All the passengers holding Pakistani, Nepalese, Bangladeshi or Sri Lankan passport traveling via Thailand with transit over 12 hours in Bangkok are now required to get transit visa prior to travel. They may be denied boarding if they don't get a visa prior to travel.
However, the layover in Bangkok is less than 12 hours, there is no requirement of a prior transit visa for these passport holders. They must have a minimum of 6 months of passport validity.
Thus, I recommend you to consult with your travel agent from where you took the ticket. See if you can change flight that has transit hour less than 12 hours.
Best of luck.