I haven't quite figured out the optimal pillow setup to keep me propped up comfortably, but a good quality adjustable laptop table has been a lifechanger for me in terms of working in bed. (No more trying to prop the laptop up on my knees and pillows!)
I think this one [Amazon] is the one I have - very sturdy so far and well built, with several thoughtful touches like a drawer for pens and such and a removable ledge/baffle to support the laptop when at a steep angle without digging into the wrists.
It tilts enough that I can comfortably type away even while pretty much completely horizontal. (Depending on the position, a supporting pillow under the arm can be a good addition.) It's also light enough (if not covered in books!) that I can just lift it out of the way and set it on the side of my bed by the wall when I'm done with it for the day.
Also works well when seated on a couch or a floor (this model's probably a touch too wide for an armchair).
I've also seen similar models with book stands at the back of the table to hold a book/notes while you type.
It’s this one, gone through loads of laptop trays/desks in the past but this is my favourite by far. https://www.amazon.co.uk/dp/B08B7ZVVTY/ref=cm_sw_r_cp_api_glt_fabc_GKWSEY8CSSPS74B949DY?_encoding=UTF8&psc=1
https://www.amazon.co.uk/dp/B08B7ZVVTY/ref=cm_sw_r_cp_api_glt_fabc_GKWSEY8CSSPS74B949DY?_encoding=UTF8&psc=1 No cooler but I also have 2 of these to prop it up for a airflow, works well.