The way you look is the result of heredity, alimentation and lifestyle.
These factors control our weight by making the balance between energy intake (food and drinks) and energy consumed.
Energy is consumed in three ways: resting metabolic rate (RMR), the energy your body uses just to keep you alive and maintain body temperature; diet induced thermogenesis (DIT), the energy used to digest, absorb, transport, metabolize and store aliments; and physical activity.
For sedentary persons, BMR represents 60 to 75 % of the expense, DIT about 10 % and physical activity just about 10 and 25 %. People with active and sportive life consume more than 90 % of their energy in physical activity.
The necessary intake varies with age, sex, and occupation. Males between 19 and 50 years require 3,000 kcal (kilocalories) daily, while sedentary males 76 and up need 2,000 kcal per day. For women, the numbers are 2,400 kcal and 1,600 kcal, respectively.
When the balance is positive the body will store excess energy coming from fat, carbohydrates, protein and even alcohol as fat. The resting metabolism wastes energy all the time just for heart beats, breathing, kidney function, brain functioning and digestion.
Of course, more food intake or less energy expenditure result in equivalent weight gains and the opposite, a weight loss corresponds to an equivalent decrease of food intake or increase of physical activity. This is simplistic, as hereditary and hormonal differences between individuals count very much.
Weight variation is a slow process that takes weeks and weight gain or loss require a long-term state where caloric intake exceeds or are exceeded by expenditure.
It's right to say that playing a game will consume more calories than taking an afternoon nap, but this does not mean that the individual that slept will gain weight, as weight fluctuations are determined by changes in energy balance over extended periods of time.
Moreover, some researches showed that individuals who are deprived of sleep or get limited sleeping periods are more prone to weight gain than those with adequate sleep times. The lack of sleep induces a drop of the leptin hormone levels. This hormone is known to trigger a fullness sensation, whereas low amounts inflict hunger. More over, sleep loss rises grehlin hormone levels, a compound linked to hunger sensation.