Modified from an earlier answer
The seemingly unlikely emergence of a Czechoslovakia is largely the byproduct of diligent Czech nationalist activism, Allied postwar imperatives, and the sudden nature of Austro-Hungarian collapse. Of the Dual Monarchy's national minorities, the Czechs were in an advantageous political position for the chaos of World War I. In the prewar period, the Czechs were able to develop a relatively detailed political program and assert some degree of national rights versus the German minority. The various prewar fights over the national question meant that the Czechs had a highly developed political discourse about national rights and the geographic contours of their homeland. Czech national activists were able to posit that the Czech nation had a long historical pedigree (Bohemia) and paint other nationalities as either benign or pernicious to a future Czech state. The various writings of Masaryk such as Nová Evropa and those of other Czech intellectuals convinced the Allies that the Czechs had a clearer understanding of the nationalities issues than other groups. The activities of the Czech Legion and Masaryk's contributions to Allied intelligence also added a greater gloss to the Czechs that placed them in higher esteem than other groups. In particular, Masaryk and the Czech exile community were able to paint the Magyars as co-conspirators with the Austro-Germans in repressing national minorities. This contributed to a perception among the Allies that the Slovaks would be better off in a union with the new Czech state. The Czech exiles argued they could integrate the Slovaks far better than either the Poles or the Hungarians. In light of Wilson's call for national self-determination, Czech nationalists contended that the mutually intelligible nature of Czech and Slovak made the two nationalities a natural fit together with the Czechs assuming the senior role as the most developed nationality. There was no real Slovak voice in these matters.
An enlarged Czech state was not an automatic given in the immediate postwar. Although the Allies favored an enlarged Czech state, the near total collapse of Austria-Hungary created conditions that could undo all the plans of the Czech exiles. Fortunately for the Czech movement, the political leaders were able to swiftly take over the intact administrative and military apparatus of the dissolving Austro-Hungarian state. This was where the chronic ineptitude and weak state of the Habsburgs played into the Czech hands; there was no supranational framework to resist this quiet Czech administrative revolution after the abdication of the last Habsburg emperor. The Allies welcomed this development as Czech state was relatively stable and would be a lynchpin of the "little Entente" France was seeking to construct within Eastern Europe. The Slovak nationalists had no practical alternative but to be a part of the new state. The Czechs promised a degree of national unity and stability after a tumultuous war which also added to their attractiveness of accepting Czechoslovakia.
The Slovak nationalist activists had tended to make common cause with the Czech nationalists operating abroad during the war. In hindsight, they had very little choice in their ally. This was a function of the fact that the Magyars under the Dual Monarchy tended to try and push for the one-nation Hungarian state which entailed Magyarization. An alliance with the Czechs was for some Slovak nationalists was the least worst alternative. The disorder in Hungary following Béla Kun's declaration of a Soviet republic and the Romanian invasion made an accommodation with the Czechs more appealing. Although he had yet to become as he would become in the 1930s, Jozef Tiso, a rising star in the Slovak People's Party under the chairmanship of Andrej Hlinka, tacked towards a policy of pragmatic cooperation with the Czechs with the long term-goal of Slovak autonomy. Although Tiso cooperated with Prague, he always made sure to assert that autonomy was the ultimate goal of the Slovak national movement. Both Masaryk and Benes were pragmatic when facing Slovak demands for autonomy and granted modest concession in the 1920s in exchange for the Slovak People's Party joining the government.
Sources
Hilde, P. S. "Slovak Nationalism and the Break-Up of Czechoslovakia". Europe Asia Studies. 51, no. 4(1999): 647-666.
Zückert, Martin. "National Concepts of Freedom and Government Pacification Policies: The Case of Czechoslovakia in the Transitional Period After 1918". Contemporary European History. 17 (2008): 325-344.
kieslowskifan to the rescue as always when it comes to this question!
I also have these threads saved from a while ago: