Some of the ways how one can manage to make their body lose fat while sleeping are:
Cooler temperature
Keeping a cool temperature of the room while sleeping can be very helpful in losing one's weight all the while one is sleeping. It is said that, having cold temperature while sleeping makes the body metabolize the brown fat at a faster rate to control the optimum temperature of the body. In this process, the brown fat tends to burn quicker thus burning the calories alongside.
⇆
8 hours of sleep
Getting a complete 8 to 9 hours of sleep daily helps in burning calories at a much faster rate than the ones who only sleep for 5 to 6 hours. Sleeping in time means the body will not have to burn the calories at a slower pace just to keep the energy up, instead it can burn at a nominal rate and burn the calories easily. Also sleeping for only a few hours means one will have more hunger promoting hormones like ghrelin, which can be a factor for weight gain.
Protein before bed
One can have some protein snack before bed as well as it will not only help in dealing with the late-night hunger pangs it will also help in making one's health overall much better and fit. Also, eating protein snack like cottage cheese or any kind of protein shake etc. which has lesser calories but more protein content can help one increase their metabolic rate and muscle generation rate.
Smaller dinners
Having heavy dinners which are packed with carbohydrates and fats means the body will not get time to repair and rejuvenate the body while one is sleeping, instead it will spend all its time cutting the sugar and storing them in the cells. This will keep the body awake and will also stop it from losing the calories, however, if one plans to have smaller dinners, then the body will not go into such hyper work mode at night.
No electrical device
Today, most of the people like to spend their time in front of TVs, phones, tablets, laptops, etc. just before going to sleep. One should avoid this at any cost because the light from the device can mess with one's metabolism and can reduce the secretion of melatonin which in turn can slow the metabolism and thus hinder the weight loss process.