the key to maintaining discipline
There are 2 important tools for any kind of person, ordinary or otherwise, to succeed at something: discipline and perseverance. Attempting a challenging task without either of those attitudes is a loss because the full practical extent of the individual's or group's capability towards that task is not utilized.
Unfortunately, discipline is boring. Immensely boring. And that is indeed one of the reasons why so many people, myself included, find it difficult to maintain it for any task, especially long-term.
The key to maintaining discipline is to make and keep it interesting. There are various ways you can do that, and honestly it is specific to you. When you are executing self-control, you are putting pressure on your brain. You are suppressing it's natural reward circuits and substituting a more "rewarding" task (like social media) for a "less" rewarding task (like studying). That is why discipline is 'boring'. There doesn't feel to be any output of maintaining it in the short term.
So keep it exciting. You could keep short goals of discipline everyday (even better with a like minded friend - maybe even a small monthly competition kind of thing). You could use a Pomodoro based app (like Engross). You could go for a walk or take a break after a focussed interval of work or study (basically giving yourself small rewards). These are some very common ways. You could figure out some other unorthodox way for yourself too: basically whatever works for you.
Just make sure you keep it interesting, and you will reface boring old discipline into one of your most powerful tools of success.