Please wait

QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

LOGO

July 14, 2014
Mattress Firm Holding Corp.
5815 Gulf Freeway
Houston, Texas 77023

Re: Registration Statement on Form S-3
Ladies and Gentlemen:

        We have acted as counsel to Mattress Firm Holding Corp., a Delaware corporation (the "Company") in connection with the registration statement on Form S-3 (the "Registration Statement") filed on the date hereof by the Company with the Securities and Exchange Commission (the "Commission") under the Securities Act of 1933, as amended (the "Securities Act"), relating to the registration under the Securities Act and the proposed issuance and sale from time to time pursuant to Rule 415 under the Securities Act of:

        The Common Stock, the Preferred Stock, the Warrants, the Units, and the Debt Securities are referred to herein collectively as the "Securities."

        In connection with this opinion letter, we have examined such certificates, documents and records and have made such investigation of fact and such examination of law as we have deemed appropriate in order to enable us to render the opinions set forth herein. In conducting such investigation, we have relied, without independent verification, upon certificates of officers of the Company, public officials and other appropriate persons.

        The opinions expressed below are limited to the laws of the State New York and the Delaware General Corporation Law.

        Based upon and subject to the foregoing and the assumptions, qualifications and limitations set forth below, we are of the opinion that:


        In rendering the opinions set forth above, we have assumed that (i) the Registration Statement will have become effective under the Securities Act, a prospectus supplement will have been prepared and filed with the Commission describing the Securities offered thereby and such Securities will have been issued and sold in accordance with the terms of such prospectus supplement; (ii) a definitive purchase, underwriting or similar agreement, and any applicable indenture (including any supplemental indenture), warrant, depositary or guarantee agreement, pursuant to which such Securities may be issued, will have been duly authorized, executed and delivered by the Company and the other parties thereto, and the specific terms of such Securities will have been duly established in conformity with the applicable agreement and the certificate of incorporation and bylaws of the Company (if applicable); (iii) at the time of the issuance of any Securities, the Company will be a validly existing corporation under the law of its jurisdiction of incorporation; (iv) the number of shares of Common Stock and Preferred Stock, as applicable, issued pursuant to the Registration Statement, together with the number of shares outstanding or reserved at the time of issuance, will not exceed the respective number of shares authorized by the Company's certificate of incorporation in effect at the time of such issuance; and (v) all the foregoing actions to be taken by the Company will have been taken so as not to violate any applicable law and so as to comply with any requirement or restriction imposed by any court or governmental or regulatory body having jurisdiction over the Company or any of its property.


        Our opinions set forth above are subject to (a) bankruptcy, insolvency, reorganization, moratorium, fraudulent conveyance and similar laws affecting the rights and remedies of creditors generally and (b) general principles of equity. Our opinions are also subject to the qualification that the enforceability of provisions in the Indenture providing for indemnification or contribution, broadly worded waivers, waivers of rights to damages or defenses, waivers of unknown or future claims, and waivers of statutory, regulatory or constitutional rights may be limited on public policy or statutory grounds. In addition, we express no opinion with respect to the enforceability of rights to receive prepayment premiums or the unaccrued portion of original issue discount upon acceleration of any Debt Securities, in each case to the extent determined to be unreasonable or to constitute unmatured interest.

        We hereby consent to the filing of this opinion letter as an exhibit to the Registration Statement and to the use of our name therein and in the related prospectus under the caption "Legal Matters." In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations of the Commission thereunder.

    Very truly yours,

 

 

/s/ ROPES & GRAY LLP

 

 

Ropes & Gray LLP



QuickLinks