Texas prisoner Juan Chavarria appeals the district court’s dismissal of his 42 U.S.C. § 1983 suit as frivolous and for failure to state a claim under 28 U.S.C. § 1915A. Chavarria appeals only the denial of his claim that the constant illumination of his cell deprives him of sleep, violating his rights under the Eighth Amendment.
Chavarria has been confined to administrative segregation (a section of the prison reserved for the most dangerous prisoners) in the Eastham Unit of the Texas Department of Criminal Justice, Correctional institutions Division (“TDCJ-CID”) since April 2000. He alleges that bright fluorescent lights and light bulbs completely illuminate his cell twenty-four hours a day. He asserts that he cannot sleep because of these lights. Chavarria submitted two written grievances with the prison regarding the lighting, specifically explaining that the lighting was causing him to lose sleep. Chavarria also alleges that he *435met with Major Richard Alford in response to a hunger strike protesting the lighting. Alford informed Chavarria that it was necessary to keep the lights on for security reasons. When Chavarria suggested that the lights could be dimmed during the night and turned up by the guards when they passed by to inspect the cells, Alford noted that such a practice would be even more disruptive of sleep. Alford accordingly denied the request to change the lighting.
Chavarria’s subsequent pro se lawsuit alleging that the constant illumination of his cell constitutes cruel and unusual punishment violating the Eighth and Fourteenth Amendment was referred to a magistrate judge by the district court. The magistrate judge conducted all proceedings in this case pursuant to the parties’ consent under 28 U.S.C. § 636(c). The magistrate judge granted Chavarria’s motion to proceed informa pauperis (“IFP”) and withheld service of process subject to screening under 28 U.S.C. § 1915A. An evidentiary hearing was conducted pursuant to Spears v. McCotter, 766 F.2d 179 (5th Cir.1985). At the hearing, Chavarria testified that the strong lights caused him to see lights, shadows, and spots. Warden Jason Heaton, from the Michael Unit of the TDCJ-CID, testified that the lights in his unit were kept on all night to permit guards to see inside the cells for security checks. At his unit, however, the lights were dimmed at night when not making a security check or conducting a count. Chavarria then informed the magistrate judge that this was not the practice at Eastham but he was requesting that a similar policy be followed.
The magistrate judge found that, although sleep constitutes a basic human need, Chavarria had not shown a deprivation rising to the level of an Eighth Amendment violation because there was no evidence he made complaints to medical personnel about lack of sleep and because the policy was a reasonable security measure. The magistrate judge dismissed the claim as frivolous because the complaint lacked any arguable basis in law and failed to state a claim upon which relief may be granted.
The district court is empowered to dismiss a complaint filed by a prisoner against an officer or employee of a governmental entity if the complaint “is frivolous, malicious, or fails to state a claim upon which relief may be granted.” 28 U.S.C. § 1915A(b)(1). A complaint is legally frivolous when it is based on an indisputably meritless legal theory. See Neitzke v. Williams, 490 U.S. 319, 325, 109 S.Ct. 1827, 104 L.Ed.2d 338 (1989). Under § 1915A, we review a dismissal as frivolous for abuse of discretion. See Martin v. Scott, 156 F.3d 578 (5th Cir.1998).1 This Court may affirm on any basis supported by the record. See Davis v. Scott, 157 F.3d 1003, 1005 (5th Cir.1998).
We begin by recognizing that while the Constitution does not mandate comfortable prisons, it does not permit inhumane ones. Harper v. Showers, 174 F.3d 716, 719 (5th Cir.1999). The conditions under which a prisoner is confined are subject to scrutiny under the Eighth Amendment, which prohibits the unnecessary and wanton infliction of pain. See Rhodes v. Chapman, 452 U.S. 337, 347, 101 S.Ct. 2392, 69 L.Ed.2d 59 (1981). A two-*436part test determines whether a prisoner has established a constitutional violation. Harper, 174 F.3d at 719. First, there is an objective requirement to demonstrate conditions “so serious as to deprive prisoners of the minimal measure of life’s necessities,” as when the prisoner is denied “some basic human need.” Woods v. Edwards, 51 F.3d 577, 581 (5th Cir.1995); Farmer v. Brennan, 511 U.S. 825, 834, 114 S.Ct. 1970, 128 L.Ed.2d 811 (1994). Second, under a subjective standard, it must be shown that the responsible prison officials acted with deliberate indifference to the prisoner’s conditions of confinement. Woods, 51 F.3d at 581. “The second requirement follows from the principle that only the unnecessary and wanton infliction of pain implicates the Eighth Amendment.” Farmer, 511 U.S. at 834, 114 S.Ct. 1970 (internal quotation marks and citations omitted) (emphasis added). Accordingly, while conditions of confinement that constitute severe deprivations without penological justification violate a prisoner’s rights under the Eighth Amendment, a prison regulation that infringes upon a prisoner’s constitutional rights will be upheld if it is reasonably related to legitimate penological interests. See Rhodes, 452 U.S. at 347, 101 S.Ct. 2392; Talib v. Gilley, 138 F.3d 211, 214 (5th Cir.1998). Moreover, prison officials are not required to adopt the policy least restrictive of prisoners’ rights, so long as the policy itself is reasonable. Talib, 138 F.3d at 215 n. 4.
This court has recognized that sleep constitutes a basic human need. Harper, 174 F.3d at 720. Even assuming arguendo that Chavarria has alleged conditions leading to a sleep deprivation sufficiently serious to be cognizable under the Eighth Amendment,2 Chavarria cannot establish an Eighth Amendment violation because he cannot show that his deprivation is unnecessary and wanton. According to Chavarria, he was told by defendant Major Alford that the lights were kept on in the administrative segregation area for security reasons to prevent guards being assaulted by an inmate in a dark cell. A policy of dimming the lights at night and brightening them each time the guards passed by the cell would be even more disruptive to inmate sleep and thus was not an alternative that would fully accommodate the prisoner’s right to sleep. See Turner v. Safley, 482 U.S. 78, 91, 107 S.Ct. 2254, 96 L.Ed.2d 64 (1987) ( “[A]n alternative that fully accommodates the prisoner’s rights at de minimis cost to valid penological interests may indicate a regulation is not reasonable”). The policy of constant illumination is thus reasonably related to the legitimate penological interest of guard security.3 Accordingly, the enforcement of *437the policy does not violate the Eighth Amendment. See Talib, 138 F.3d at 214. Because the policy of 24-hour illumination does not violate the Eighth Amendment, Chavarria’s complaint about the policy is based upon an indisputably meritless legal theory. The magistrate judge’s determination that Chavarria’s lawsuit was frivolous was correct.
AFFIRMED.
Pursuant to 5t<CARET>h Cir. R. 47.5, the court has determined that this opinion should not be published and is not precedent except under th elimited circumstances set forth in 5Th CirR. 47.5.4.
. Subsequent panel decisions have reviewed dismissals of a claim as frivolous under § 1915A de novo. See Ruiz v. United States, 160 F.3d 273, 274-75 (5th Cir.1998); Velasquez v. Woods, 329 F.3d 420, 421 (5th Cir. 2003). When, panel opinions are in conflict, the earlier decision controls. Martin was decided three months prior to Ruiz; accordingly, Martin and the abuse of discretion .standard of review controls.
. It is, however, far from clear that Chavarria has alleged a harm cognizable under the Eighth Amendment. Although sleep is a basic human need, only conditions sufficiently serious as to deprive a prisoner of the minimal civilized measure of life's necessities are cognizable under the Eighth Amendment. See Woods v. Edwards, 51 F.3d 577, 581 (5th Cir.1995). Here, Chavarria asserted that he only gets between "30 to 35 hours per day” of sleep. It is unclear from this apparent typo how much sleep Chavarria actually gets, and thus whether he has been deprived of the minimal measure of life’s necessities is indeterminate. Moreover, we question whether Chavarria has alleged conditions serious enough to cause sleep deprivation. However, because we are reviewing this case under § 1915A, we assume without deciding that the conditions alleged by Chavarria are sufficient to satisfy the non-frivolous threshold at this stage of the proceedings.
. Although other courts have found that there is no legitimate penological justification in constant illumination, these cases were premised on the notion that the defendants offered no reason why the cells could not have switches outside so that the guards might see in when they needed to. See Keenan v. Hall, 83 F.3d 1083, 1090-91 (9th Cir.1996); LeMaire v. Maass, 745 F.Supp. 623, 626 (D.Or. *4371990). "[I]f an inmate claimant can point to an alternative that fully accommodates the prisoner’s rights at de minimis cost to valid penological interests, a court may consider that as evidence that the regulation does not satisfy the reasonable relationship standard.” Turner v. Safley, 482 U.S. 78, 91, 107 S.Ct. 2254, 96 L.Ed.2d 64 (1987). Here, however, the prison officials offered a reason why the cells could not have lights on the outside: they contend that it would be just as disruptive to sleep to have the lights turned on and off repeatedly during the night. We accept the judgment by the prison officials that turning bright lights on only when needed would be as disruptive because "[w]e will not ... subject[] the day-to-day judgments of prison officials to intrusive second-guessing.” Talib v. Gilley, 138 F.3d 211, 215 (5th Cir.1998). The alternative suggested by Chavarria would not fully accommodate prisoners rights. Accordingly, under these circumstances, there is a legitimate penological justification for the constant illumination policy. Accord Shepherd v. Ault, 982 F.Supp. 643, 647 (N.D.Iowa 1997) (“[Wjhether constant lighting serves a legitimate penological purpose depends upon the circumstances of the case.”).