In Srimad Bhagavatam, Lord Krishna explains the three gunas to Uddhava, said P.T. Seshadri in a discourse. A person who has sattva guna is always awake. Even when it seems as if he is asleep, he is actually meditating on the Lord. One with rajas has many dreams when he sleeps. The one with tamas has deep sleep. Uddhava wants to know what he should do to reach the feet of Lord Krishna. Krishna replies that those with sattva guna will reach a higher loka. Those with rajas will be reborn as humans. If the guna of tamas is predominant in a man, naraka is guaranteed for him, and once he has paid for his karma in naraka, he will be reborn as an animal, bird or plant.
Krishna says that if a person thinks of the Lord at the time of death, he will reach His feet. We see how the story of Jadabharata illustrates that worldly affections undo the good effects of tapas. Jadabharata knew the value of detachment and moved to a forest to do penance. One day, he happened to rescue a newborn deer. He took it to his ashram and cared for it. In course of time, the deer became the centre of his life, and he could not concentrate on his tapas. Even when he died, his thoughts were about the deer. Because his last thoughts were not about the Supreme One, all his penance went to waste and he did not attain liberation.
Krishna says even food habits can be classified as sattvic, rajasic and tamasic. That which has been offered to the Lord, and that which is good for our health is sattvic food. Eating what the tongue likes is rajasic. Eating what is bad for one's health and eating that which is not offered to God is tamasic. He who conquers rajas and tamas, who worships the Lord in archa form and spends his entire life meditating on the Lord will attain moksha.