How Sharing a Bed with My Girlfriend Changed My Sleep


It’s not easy to catch some much-needed Zs with someone doing the horizontal version of the Macarena in bed next to you.


via GIPHY

And I can tell you from experience, after many months of nights like this, one begins to fear for one’s health and sanity, but it’s a difficult one to broach. Polite requests such as “OMG CAN YOU FUCKIN KEEP STILL FOR A BIT?” inevitably lead to tension, but fortunately data solves arguments, so, delicate tact having failed, my way forward was clear…

As part of a short-lived and laughable health kick, I invested in a Fitbit in spring 2016 and therefore have a presumably reasonably-accurate record of my sleep since that time. In what can only be described as a generous nod, Fitbit allows you access to your own bodily information by way of an API, which facilitated a simple comparison of my sleep quality since we began sharing a bed, to that of a corresponding single-sleeping period beforehand.

At a naive first glance, the evidence was damning:

0.6 hours, or ~35 minutes, less sleep every night. Over the course of a lifetime that equates to 1.9 YEARS less time sleeping, assuming that the sleep deprivation itself didn’t shorten your life, or you weren’t murdered as part of the sleep arguments.

Makes you think, though: was my previous sleep profile simply shrunk by a linear factor, or was there a more interesting effect going on?

Turns out, since we started sharing a bed, most nights I have the same amount of sleep as before. The change in average has happened because the distribution has squished a bit: I have more nights with few hours’ sleep, and fewer nights with a massive sleep (goodbye lie-ins):

Back in the epoch of solitude, I pretty much always got at least 5.5 hours sleep, and often as much as 9.5. As we say in East Lancashire, them were the days.

But now: look at some of those nights! There were a fair few when I got less than 5 hours sleep, and considering that my employer only starts the working day at 10:00 and therefore I need to be awake at about 08:30, that speaks volumes about when I actually went to bed. Fortunately, one of the things tracked by Fitbit is what it thinks is your “hours in bed”, which presumably is a period when your bodily signals are consistent with being horizontal, still, and quiet. Comparing this metric for the Apart and Together periods yielded the following…

Whoa whoa whoa. What’s going on here? There are several deeply disturbing conclusions to draw:

  1. I’m spending a shit load less time even giving myself a chance to sleep.
  2. I’ve become a shit load less consistent in how much time I spend in bed.
  3. When I was solo bunking, there were days when I would spend as much as 12.5 hours in bed. Did I have deep-seated problems? Almost certainly.
  4. I presume some of the lower extremes are from times when the Fitbit had its battery run out, cease tracking because I was in a weird position, etc etc. Seems consistent in both the Apart and Together samples, which would support this.

So basically, I’m in bed less, and that’s why I sleep less. How does that look?

So most of the actual effect here comes from getting up earlier, with the secondary influencing factor being going to bed later…

 

 

The natural progression from this is to ask, so of the time I am even eligible for drifting off, how much of it am I sleeping? The answer is reassuring:

Conclusion

Whilst spending nights with my girlfriend results in less time in a state which Fitbit recognises as “lying in bed ready to sleep”, because we go to bed later and get up earlier, when I am in that state, I sleep better.

Footnote

There isn’t really much to the code needed to rive the data down from Fitbit, but for anyone interested, here it is:

import fitbit
import datetime

authd_client = fitbit.Fitbit('client id here', 'client secret here'
	,access_token='you get the idea'
    , refresh_token='i am your biological mother')

outfile = open("output.txt", "a")
outfile.write("Period, Date, Sleep Start, Sleep End, Mins Asleep, Mins Awake, Times Awake, Mins Restless, Times Restless, Minutes Until Sleep, Minutes After Aleep, Mins in Bed\n")

def writeData(sDate, eDate, period):

	startDate = datetime.datetime.strptime(sDate, "%Y-%m-%d")
	reportingDate = startDate
	endDate = datetime.datetime.strptime(eDate, "%Y-%m-%d")
	
	while reportingDate <= endDate:
		response = authd_client.sleep(date=reportingDate, user_id=None)
		for thing in response["sleep"]:
			if thing["isMainSleep"] == True:
				start = thing["startTime"]
				end = thing["endTime"]
				asleepTime = thing["minutesAsleep"]

				awakeTime = thing["minutesAwake"]
				awakeNumber = thing["awakeningsCount"]

				restlessTime = thing["restlessDuration"]
				restlessNumber = thing["restlessCount"]

				fallAsleep = thing["minutesToFallAsleep"]
				lieIn = thing["minutesAfterWakeup"]				
				
				inBedTime = thing["timeInBed"]
				
				outfile.write(period+","+str(reportingDate)+","+str(start)+","+str(end)+","+str(asleepTime)+","+str(awakeTime)+","+str(awakeNumber)+","+str(restlessTime)+","+str(restlessNumber)+","+str(fallAsleep)+","+str(lieIn)+","+str(inBedTime)+"\n")
				print(asleepTime)

		reportingDate += datetime.timedelta(days=1)
		print("Done "+str(reportingDate))
	return()




writeData("YYYY-MM-DD start of apart period", "YYYY-MM-DD end of apart period", "Before")
writeData("YYYY-MM-DD start of together period", "YYYY-MM-DD end of together period", "After")

outfile.close()

And the charts were made using the magnificent Pygal.

One thought on “How Sharing a Bed with My Girlfriend Changed My Sleep”

Comments are closed.